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.
Three checks before work
Memory and resource bounds
Fairness boundary
Before dependency work
Conceptual checks, not three separate network calls. The application acts on refusal.
Read the numbered steps in order. The explanation below follows the narration.
Three different questions protect three different boundaries.
Combine local survival, tenant fairness, and dependency feedback without confusing denial with missing decisions.
Combine local survival, tenant fairness, and dependency feedback without confusing denial with missing decisions.
Before expensive work, ask three different questions. Does this application have enough local headroom? Is this tenant within its allowance? Is the shared dependency's latency signal below this operation's threshold? The first question is application-owned local protection. The other two are RateLimitly's fairness and latency decisions.
If these required checks admit the work, perform the operation, measure its duration, and report it to the correct tracker. A policy refusal means a check answered no. Use a safe cheap fallback where the product permits one, or return an explicit refusal. Do not secretly start the refused operation anyway.
A transport failure is different: your application could not obtain a reliable answer from the decision service. A failure policy specifies what to do then. Allowing work despite that uncertainty favors immediate access; refusing favors protecting the dependency. Neither choice is universally correct. Choose and test it deliberately, with local bounds still active.
Keep the API key on the trusted application side, match identities and settings, and observe failures separately from ordinary policy refusals. The decision service also needs capacity and failure testing. A protection that gates work becomes part of the service you operate.
Local resource safety, tenant fairness, and dependency pressure answer different questions. No one check establishes all three.
Only start protected work after required checks allow it. A refusal must branch around the work, not merely add a log entry.
An unavailable decision service is not an ordinary policy refusal. Choose and test failure behavior per operation while retaining independent local bounds.
Keep identity, state scope, credentials and observed errors explicit. The decision service is itself a dependency whose failure behavior needs testing.
Content revision: 07c7dd00db17
Download review copy (27 lessons)A decision-service call failed. Is that the same as a policy refusal?
No. A refusal is a known decision. A transport failure is missing or unreliable decision evidence and needs an explicit failure policy.
Local resource check → tenant/latency admission → branch → protected work → measured report. Keep credentials server-side and test refusal and transport-failure branches.
RateLimitly does not currently provide the application’s memory guard. A decision-service failure cannot safely be interpreted as automatic admission in every product.
Start here. No earlier lesson is required.
Application-owned local admission protects room to finish work and respond.
A rate limit enforces an allowance, not a measurement of current resource health.
Use the same API key, tenant bucket name, window, and allowance across every client.
Define one meaningful stopwatch boundary before interpreting its measurements.
The tracker observes; the guard decides; your application enforces the decision.
Choose fail-open or fail-closed per operation, observe admission overhead and failures, and keep independent bounds when decisions are unavailable.
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.