Kotlin Rate Limiter Demo
Watch a rate limiter under real load. Pick a scenario, tune rate and burst, and see what breaks — token-bucket shaping, honest overload, and dropped work visible in the metrics.
Backed by github.com/delder004/kotlin-rate-limiter .
Scenarios
Click a scenario to start the simulation and watch the limiter in action.
Under the limit
10 req/s through a 20/s limiter — limiter stays out of the way.
Exceed the limit · Deny
40 req/s into a 10/s limiter — watch the red denied gap open up.
Exceed the limit · Queue
Same overflow, buffered instead of dropped — latency climbs.
Burst then drain
60 req/s spike for 5s, then drops to 5 req/s — limiter shaves the spike.
Smooth warmup
Smooth limiter ramps up over 5s before reaching 20/s.
Tiered limits
Two stacked limits: 30/s AND 120/10s. Long-run ceiling kicks in.
Stats
Queued: 0
In flight: 0
Admitted: 0
Completed: 0
Denied: 0
Dropped incoming: 0
Dropped outgoing: 0
Accept rate: 0
Reject rate: 0
Avg latency (ms): 0
p50 latency (ms): 0
p95 latency (ms): 0
Tweak config
Limiter
Bursty Smooth Composite