jargon

Backend & systems·API and interface design

you let clients save up allowance while idle and spend it in a burst, as long as the long-run average stays under the limit.

Token bucket

A rate-limiting algorithm where tokens accumulate at a fixed rate up to a cap and each request consumes one. It permits bursts up to the bucket size while enforcing an average rate, which matches real traffic better than a hard per-second cap. Bucket size is the knob for how much burstiness you will tolerate.

Commonly confused with