Skip to content

Leaky Bucket

Spicy — senior dev territoryBackend

ELI5 — The Vibe Check

A leaky bucket processes requests at a fixed rate, like water dripping from a bucket. No matter how fast requests pour in, they come out at a steady drip. Excess requests overflow (get dropped). It smooths bursty traffic into a constant stream.

Real Talk

The leaky bucket algorithm queues incoming requests and processes them at a fixed rate, regardless of arrival rate. The bucket (queue) has a fixed capacity; excess requests are dropped when full. Unlike token bucket (which allows bursts), leaky bucket enforces a strict constant output rate. Used for traffic shaping and ensuring steady downstream processing.

When You'll Hear This

"Leaky bucket ensures our payment processor never gets more than 50 requests/second." / "Use leaky bucket when the downstream service needs a strictly constant request rate."

Made with passive-aggressive love by manoga.digital. Powered by Claude.