Why simulate rate limiters?
Production APIs throttle traffic with algorithms that behave very differently under bursts, retries, and clock boundaries. Reading docs alone rarely builds intuition. This simulator runs real implementations in your browser so you can fire traffic, watch allow vs block decisions, and compare five major strategies side by side.
Algorithms included
- Token bucket — refill tokens over time; allows controlled bursts.
- Leaky bucket — queue drains at a fixed rate; smooths traffic.
- Fixed window counter — simple counter per time slice; watch boundary bursts.
- Sliding window log — exact counts using timestamps; higher memory.
- Sliding window counter — weighted previous + current window; popular Redis-style approximation.
How to use this tool
- Pick an algorithm tab and tune capacity, rates, or window size.
- Send single requests, bursts, or enable auto-fire at a chosen rate.
- Run a traffic pattern preset (for example “Window boundary attack” with a 10-second window) to see fixed-window edge cases.
- Enable Compare mode to fan the same requests into all five limiters and inspect the success table.
- Expand Code snippets for JavaScript, Python, Go, or Redis-style notes.
Is data sent to a server?
No. The simulation uses React state and timers only. Nothing is uploaded; you can use it offline after the page loads.