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.
Little’s law worked example
Same measurement boundary
Not a minimum
100 × 0.1
Illustrative mechanism. Highlight follows the explanation; not a benchmark.
Read the numbered steps in order. The explanation below follows the narration.
Stable example: throughput × average time = average in flight.
Latency is useful feedback, not an exact queue or spare-capacity measurement.
Latency is useful feedback, not an exact queue or spare-capacity measurement.
The latency signal is useful because longer operations can keep more work unfinished. Consider a system completing one hundred operations per second. In a stable period, if each operation spends one tenth of a second inside the chosen boundary on average, there are ten operations inside it on average.
In a different stable period, the same completion rate and half a second of average time correspond to fifty operations inside. Average time means the total time divided by the number of operations. Little's law is the relationship between these averages: work in flight equals throughput multiplied by time.
RateLimitly does not insert its minimum into that formula. A minimum and an average are different numbers. The tracker therefore does not calculate an exact queue size or read the database's remaining memory. Communication delays, slow computation, and connection waiting can all affect the chosen measurement.
Use latency feedback to decide when adding work looks unwise, not to claim perfect knowledge of spare capacity. A sudden failure can happen before enough new reports arrive. Independent resource bounds and operational monitoring still have jobs to do.
For a stable period and a consistent boundary, average work in flight equals throughput multiplied by average time.
Derived examples: 100 × 0.1 = 10; 100 × 0.5 = 50. Longer time can retain more simultaneous work even with the same completion rate.
RateLimitly does not substitute its minimum sample into Little’s law. Minimum and average are different statistics.
The signal is evidence for admission, not an exact measurement of queue length, spare memory, utilization, or stability.
Content revision: 07c7dd00db17
Download review copy (27 lessons)Can you substitute the tracker’s recent minimum for the average time in Little’s law?
No. Little’s law relates compatible averages under appropriate conditions. The tracker’s minimum is a different signal.
Calibrate and test thresholds against real workload behavior while keeping independent resource limits and monitoring.
The 10- and 50-operation examples describe separate stable periods, not an exact estimate during a growing transient queue.
Start here. No earlier lesson is required.
100 arrivals/s − 80 completions/s = 20 extra unfinished requests/s.
Define one meaningful stopwatch boundary before interpreting its measurements.
The eligible recent minimum is a pressure signal with freshness and missing-data limits.
Use consistent measurement boundaries and compatible averaging intervals. Neither latency alone nor a minimum establishes cause, utilization, memory, or stability.
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.