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.
Application-owned admission
Decision happens before expensive work
Uses local resource pressure
Needs resources already promised
Illustrative mechanism. Highlight follows the explanation; not a benchmark.
Read the numbered steps in order. The explanation below follows the narration.
Admission decides whether new work may start.
Application-owned local admission protects room to finish work and respond.
Application-owned local admission protects room to finish work and respond.
The application can make a decision before accepting more expensive work. That decision is admission. Load shedding means deliberately refusing some work so the work we keep has a better chance of finishing.
For local memory protection, observe the memory budget of this application process or container. Keep headroom: unused capacity for work already accepted, resource cleanup, and sending responses. When pressure is too high, refuse new work before making large allocations. Middleware is application code that runs around request handling; it is one place to perform this check.
HTTP is the request-and-response protocol used by the web. Its response status code tells the caller what happened. A 503 response can communicate temporary service overload. Producing that response still costs resources, so even refusal needs headroom.
Who owns this protection? Your application does. RateLimitly does not currently supply this memory-monitoring middleware. Local memory checks also do not protect every CPU, connection, or database limit. They address the resources this application can observe and control.
Admission is a decision before new work starts. Load shedding deliberately refuses some work so admitted work has a better chance of completing.
Observe the resource limit that applies to this process or container. Leave space for accepted work, cleanup, and the response used to refuse more work.
A temporary-overload response can use HTTP 503. Sending that response still consumes resources, so refusal must remain a cheap path.
This memory guard belongs to your application, not a current RateLimitly middleware feature. It does not directly protect every shared dependency.
Content revision: 07c7dd00db17
Download review copy (27 lessons)Does refusing a request cost nothing?
No. Refusal still uses resources, so the application needs headroom before it reaches a hard limit.
Check local pressure before large allocations; bound retained/concurrent work and define the overload response.
This is application-owned protection, not a current RateLimitly local-memory feature or a complete resource policy.
Start here. No earlier lesson is required.
Accepting a request is not the same as delivering a useful result.
100 arrivals/s − 80 completions/s = 20 extra unfinished requests/s.
Waiting work can retain memory. A failed allocation or terminated process can stop service.
Choose runtime-aware signals and test threshold behavior under measurement delay, allocation spikes and cleanup costs. Platform concurrency limits can complement memory admission.
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.