Skip to the content.

A distributed rate limiter is a rate limiting system that works across multiple servers/nodes instead of a single process. This is needed when your system is horizontally scaled (e.g., multiple API servers behind a load balancer).

If each server keeps its own counter/bucket β†’ a user could exceed the global limit by spreading requests across servers. So, we need coordination.


πŸ”Ή Common Approaches for Distributed Rate Limiting

1. Centralized Store (Redis / Memcached / DB)


2. Distributed Locks


3. Sharded Counters


4. Leverage Streaming Systems


5. Token Distribution (Pre-allocation)


πŸ”Ή Example Tech Choices


βœ… Summary