Performance

Token bucket

Rate limiter that accumulates tokens at a fixed rate.


In plain terms

Allows bursts up to bucket size, smooth rate at long term. Default for most rate limits in cloud APIs.

Origin

Originally ATM cell-rate specification. Generic now — every cloud rate limiter, every CDN, every API gateway implements it.

Where it shows up in production
  • Stripe, GitHub, AWS APIs All use token-bucket variants; bursts allowed up to bucket size, average rate stable.
  • tc (Linux traffic control) TBF queueing discipline shapes outgoing traffic with token bucket semantics.
On Semicolony
Sources & further reading
Found this useful?