Why you shouldn’t use Redis as a rate limiter: Part 1 of 2
A tour of the common Redis-based rate limiter implementations — and the correctness and performance traps each one hides.
We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Rate limiting and admission checks that help reduce overload and protect expensive work.
Set admission budgets for launch spikes and promos before excess work reaches your handlers.
Fewer moving parts to run and monitor. Spend less on Redis and ops.
Add via SDK. Keep your stack. Clear limits your customers understand.
UNDERSTAND OVERLOAD · KEEP USEFUL WORK MOVING
For developers, architects, and managers: 27 narrated lessons on why services overload and how to protect them. No cloud experience required. Start with one request, or jump to any lesson.
Four chapters, one learning path. Read or listen in any order. ~41 minutes total · Times shown at 1×.
Keep enough capacity to finish work and recover.
Contain one customer's excess without punishing everyone.
Reduce work entering a shared dependency when it slows.
Choose, combine, and test the right protections.
Read the explanation or use the course map above. Audio is optional.
Bounded retry decision
Many clients at once
Extra work delays recovery
Load amplification
Illustrative mechanism. Highlight follows the explanation; not a benchmark.
Read the numbered steps in order. The explanation below follows the narration.
Immediate repeated attempts can amplify pressure.
Bound repeated attempts, spread them out, and preserve operation correctness.
Bound repeated attempts, spread them out, and preserve operation correctness.
After a refusal or a lost response, a client may try again. A retry is another attempt at the same operation. If many clients repeat immediately, they add load just when the service has less capacity.
Backoff means waiting longer between repeated attempts. Jitter means varying that wait so clients do not all return at the same instant. Bound the number of attempts and the total time available; a request whose deadline has already passed should not create endless background work. Honor the service's guidance where its contract provides it.
A missing response does not prove a write failed. Idempotency means repeated attempts have the same intended effect as one attempt. For example, a payment operation must not charge twice simply because the first response was lost. The application must provide the appropriate operation identity and duplicate handling; a rate limit cannot add those semantics for it.
During recovery, new arrivals and repeated attempts both count toward load. Restore traffic gradually, watch useful completions, and keep admission controls active. Another attempt is useful only if it has a realistic chance of delivering a correct result.
Retries are new load. Immediate repeated attempts can concentrate demand while useful capacity is already reduced.
Backoff spaces attempts; jitter prevents every caller choosing the same return instant. Bound attempts and the total remaining deadline.
A lost response does not prove a write failed. Correct duplicate handling needs operation identity and idempotency semantics supplied by the application.
Include retries at every layer in the load budget. Another attempt is useful only while it can still produce a correct result within its limits.
Content revision: 07c7dd00db17
Download review copy (27 lessons)A payment response was lost. Is immediately repeating the write always safe?
No. The first write may have committed. Correct duplicate handling and operation semantics are needed, not just another request.
Use bounded attempts, total deadlines, backoff and jitter. Define duplicate-write handling and keep refused or expired work from becoming an unbounded background queue.
A rate limit is not an idempotency mechanism. A timeout does not prove cancellation or a failed write.
Start here. No earlier lesson is required.
Timeout, cancellation, connection failure, and operation outcome are different facts.
Application-owned local admission protects room to finish work and respond.
Control admission while dependencies, replicas, and caches recover.
Combine local survival, tenant fairness, and dependency feedback without confusing denial with missing decisions.
Include retries at every layer in the total load budget; nested client/service/database attempts can multiply demand.
Original explanation inspired by Fred Hébert and operational references; no endorsement implied.
AI-generated narration: ElevenLabs Eleven v3, Daniel stock voice. Audio streams only when you start listening.
A tour of the common Redis-based rate limiter implementations — and the correctness and performance traps each one hides.
The myth of infinite serverless scale — why adding machines doesn’t fix overload, and what to do instead.