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.
Legitimate aggregate overload
Within allowance
Within allowance
Combined demand rises
Illustrative mechanism. Highlight follows the explanation; not a benchmark.
Read the numbered steps in order. The explanation below follows the narration.
A live show brings a legitimate crowd.
All customers can behave reasonably while their combined work overloads the database.
All customers can behave reasonably while their combined work overloads the database.
Now the service hosts a popular live show's video suggestions. A commercial break brings thousands of viewers at once. Aggregate demand means their combined demand, not what any one viewer sends.
Each viewer requests one suggestion and stays within the individual allowance. Every fairness check can pass. But all those accepted requests still reach the same database. If combined work exceeds the database's capacity, unfinished work accumulates even though nobody broke a rule.
More application copies and local memory protection can keep the application layer alive. They do not automatically increase the database's capacity. A fixed database-wide rate cap can be useful, but its safe value depends on request cost and available capacity. One simple lookup is not the same work as a large report.
This is a different problem from Orchid's bulk job. We are no longer asking which tenant exceeded an allowance. We are asking whether the shared resource can handle more work now. Passing the fairness check alone does not answer that question.
A live-event spike can contain only reasonable individual requests. Aggregate demand is their combined work.
Every per-tenant check can pass while the shared database receives more work than it can finish.
Application scaling and local guards do not add database capacity. A fixed aggregate cap also depends on request cost and available capacity.
Fairness asks who exceeded a policy. Shared-resource admission asks whether adding work looks safe now. One answer cannot substitute for the other.
Content revision: 07c7dd00db17
Download review copy (27 lessons)Every viewer is within their allowance. Can the shared database still overload?
Yes. The sum of individually reasonable use can exceed the database’s available capacity.
Keep tenant fairness, but also bound and observe work sent to shared dependencies. Test changes in workload cost and available capacity.
A fixed shared-resource cap can be a useful guardrail; it is not automatically well-sized for every workload mix.
Start here. No earlier lesson is required.
100 arrivals/s − 80 completions/s = 20 extra unfinished requests/s.
Database unavailable → calls wait or fail → unbounded retained app work can cause further failure.
Contain one customer's excess before it harms other customers.
A rate limit enforces an allowance, not a measurement of current resource health.
A user-count spike, costlier queries, or reduced database capacity can all make the same per-tenant policy insufficient.
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.