Distributed Rate Limiting in Redis: Token Bucket vs Sliding Window
Compare token bucket and sliding window for distributed rate limiting in Redis: atomic Lua scripts, clock source, key design, 429 headers and failure policy.
17 min read
Tag
Compare token bucket and sliding window for distributed rate limiting in Redis: atomic Lua scripts, clock source, key design, 429 headers and failure policy.
17 min read
Build a token bucket limiter in Redis with an atomic Lua script: key design, server-side clock, TTLs, 429 handling, fail-open choices, and testing.
14 min read
Build a distributed rate limiter in Redis with an atomic Lua token bucket shared by all replicas, plus key design, failure policy, testing and alternatives.
18 min read