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.
Priority-based degradation
Nice to have
More important to preserve
Acceptable alternative
Illustrative mechanism. Highlight follows the explanation; not a benchmark.
Read the numbered steps in order. The explanation below follows the narration.
Not every operation has the same customer importance.
Drop optional cost first, using a genuinely cheap and acceptable fallback.
Drop optional cost first, using a genuinely cheap and acceptable fallback.
Some work matters more than other work. Criticality is that difference in importance to the customer's task. A fallback is an acceptable alternative result. Graceful degradation means doing less expensive work while still delivering a useful, correct experience.
During the live show, personalized video suggestions are optional. A precomputed list of recent releases is a cheaper fallback. It must not call the same overloaded database to create that list on demand, or it has not removed the expensive work.
Suppose optional suggestions use a five-hundred-millisecond threshold, while essential reads use nine hundred. These are illustrative policy choices, not recommended settings. At a shared signal of six hundred, the optional guard refuses the expensive suggestions, but the essential guard can still admit its work. The application returns the cheap list instead.
At one thousand milliseconds, both positive thresholds are exceeded, so essential work can be refused too. Degradation is not a promise that everything succeeds. Protect more important work for longer, and never silently substitute an incorrect answer for a correctness-sensitive operation.
Criticality describes importance to the customer’s task. Graceful degradation removes optional work while preserving a correct useful result.
A fallback must avoid the expensive dependency. Building the supposedly cheap list from the same overloaded database defeats the purpose.
Illustrative policy: at 600 ms, the 500-ms optional guard refuses while the 900-ms essential guard still admits. Your application chooses the fallback.
At 1000 ms both positive thresholds are exceeded. Essential work may also be refused; never substitute an incorrect result for a correctness-sensitive operation.
Content revision: 07c7dd00db17
Download review copy (27 lessons)A fallback makes another expensive call to the same overloaded database. Did it remove that pressure?
No. It moved the same burden into a different branch. A useful fallback must actually avoid the protected expensive work.
Define business criticality, safe precomputed or cached alternatives, and per-operation thresholds. Return the alternative only where it preserves the intended contract.
500 ms and 900 ms are illustrative, not sizing guidance. Different thresholds do not guarantee essential work always succeeds.
Start here. No earlier lesson is required.
Bigger buffers buy time. Caching can remove work. Backpressure reduces incoming work.
Database unavailable → calls wait or fail → unbounded retained app work can cause further failure.
The tracker observes; the guard decides; your application enforces the decision.
Track degraded-but-useful responses separately from failures. Avoid fallback stampedes and preserve correctness-sensitive write semantics.
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.