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.
Shared policy across languages
Same tenant · O
Same tenant · O
More copies, more allowance
Illustrative mechanism. Highlight follows the explanation; not a benchmark.
Read the numbered steps in order. The explanation below follows the narration.
Separate local allowances can multiply one customer’s share.
Use the same API key, tenant bucket name, window, and allowance across every client.
Use the same API key, tenant bucket name, window, and allowance across every client.
One customer may reach several application copies, written in different programming languages. If each copy gives Orchid its own full allowance, adding copies also multiplies Orchid's effective allowance. The policy has changed without anyone intending it.
RateLimitly is a service that applications ask for rate and latency decisions. A client library is code that lets your program make those calls. The API key defines which RateLimitly servers those libraries use. Keep it on the trusted application side.
A bucket is the named usage record for a rate-limit policy. Use the same API key, the same tenant-derived bucket name, and the same time window and allowance across the client libraries. The libraries then apply the intended policy across your application copies instead of giving each copy its own allowance.
For example, Orchid's report requests should use the same bucket whether they come through Python or JavaScript. Adding an application copy or changing languages should not grant Orchid another share. Use distinct tenant-derived names for different customers so one customer's use is accounted for separately.
Independent full allowances per application copy multiply a tenant’s effective budget when the fleet grows.
The API key defines which RateLimitly servers the libraries use. Keep the key in trusted application code, not the public browser.
Use the same API key, tenant-derived bucket name, time window, and allowance across the libraries. Each application copy applies the intended policy.
Orchid uses the same named policy through Python and JavaScript. Different customers use distinct tenant-derived bucket names, keeping their usage separate.
Content revision: 07c7dd00db17
Download review copy (27 lessons)Orchid's report moves from Python to JavaScript. Should that give Orchid another allowance?
No. Use the same API key and the same tenant-derived bucket name, window, and allowance so both clients apply the same intended policy.
Configure every client library with the same API key, tenant-derived bucket name, time window, and allowance. Keep the key on the trusted application side.
This example covers one tenant's named policy under the same API key. It does not reserve memory or execution slots.
Start here. No earlier lesson is required.
240 requests/s ÷ 3 = 80 each; after one loss, 240 ÷ 2 = 120 each.
Contain one customer's excess before it harms other customers.
A rate limit enforces an allowance, not a measurement of current resource health.
Bucket identity is derived from its logical name, time window, and rate limit. Changing those settings defines a different policy; each request's work weight does not change the bucket identity.
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.