TCthomas.caron
~ / lab / rate-limiter
02·live·2026.04

Rate limiter lab

Token bucket vs leaky bucket vs GCRA, side by side under a burst.
stack
Canvas · Poisson · GCRA
kind
simulator
status
live

Three classic algorithms, one shared arrival stream. Requests arrive Poisson-distributed; each limiter decides accept, reject, or queue. Drag the sliders and watch how each policy handles a burst.

acceptedrejectedqueued (leaky)
offered rate20req/s
limit10req/s
burst10
last 8s
algookrejp95 wait
token bucket00%
leaky bucket00%
GCRA00%
// offered > limit triggers rejects (token/gcra) or queue growth (leaky). burst = tolerance, in requests.

Simulated in-browser at 1× wall time, not a benchmark. Token bucket and GCRA are equivalent in steady state; leaky bucket trades rejects for delay. Algorithms in src/components/lab/rate-limiter/algorithms.ts.

thesis

Poisson-arriving requests, three queuing strategies side-by-side. Tune rate, burst, capacity; watch rejection %, p95 wait, and how each algorithm behaves under load. A working illustration of Little’s Law.

← back to lab
thomas.caron — software developer
montréal, qc · UTC−04:00
built with vite + cloudflare workers
© 2026 — last deploy: 2026.05.07 ·privacy