Best of RedisJune 2024

  1. 1
    Article
    Avatar of communityCommunity Picks·2y

    Build a Caching Layer in Node.js With Redis

    Learn how to build a caching layer in Node.js using Redis to improve the performance of your backend and increase the number of concurrent users. Redis is an in-memory data repository that provides extreme performance and efficiency for caching. By encapsulating caching logic in a middleware function, you can choose which routes to apply caching to, reducing code duplication and improving maintainability. This step-by-step tutorial shows you how to set up a Redis caching layer in an Express application and provides extra tips on compressing data for better memory utilization.

  2. 2
    Article
    Avatar of implementingImplementing·2y

    How to Implement Leaderboard with Redis Sorted Sets and Node.js

    This post explains how to implement a leaderboard using Redis Sorted Sets and Node.js. It discusses the advantages of using Redis Sorted Sets over a relational database solution and provides recommendations for scaling up the solution. The post also includes a bonus section on trying the application with a UI.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    Laravel Reverb

    Reverb is a first-party WebSocket server for Laravel applications, providing real-time communication between client and server. It offers speed, scalability with Redis, and compatibility with Laravel broadcasting and Laravel Echo.

  4. 4
    Article
    Avatar of communityCommunity Picks·2y

    Why Is Redis a Distributed Swiss Army Knife 💭

    Redis is a versatile tool used to build high-performance applications and solve a variety of problems. Key use cases include caching to improve response times, queuing to process data asynchronously, distributed locking to prevent database overload, throttling to manage congestion, maintaining session stores for scalable web servers, and rate limiting to protect web servers from excessive API requests. Redis offers numerous additional features such as sorted sets, HyperLogLog, Pub-Sub, geospatial indexing, time series data, and modules like RedisSearch and RedisJSON.

  5. 5
    Article
    Avatar of awegoAwesome Go·2y

    Why and how you should rate-limit your API

    Rate limiting is essential for managing API traffic, ensuring stability, controlling costs, and protecting against abuse. It involves limiting the number of requests within a specific period (e.g., 100 requests per minute). Various policies, such as fixed window, sliding window, token bucket, and leaky bucket, can be used. Implementing rate limiting correctly is complex and depends on factors like whether it's at the proxy or application level. A practical implementation using Go and Redis employs the leaky bucket policy and provides examples of how to set up and monitor the service.