Picture a real bucket with a small hole in its base. You can pour water in at any rate — a trickle one second, a torrent the next. But the water drips out at exactly the same steady pace, determined only by the size of the hole. Overflow simply spills away.
That is the leaky bucket algorithm in a sentence. Replace "water" with "network packets" and you have one of the most enduring ideas in traffic engineering. Packets arrive in unpredictable bursts — a user clicks a link, a server replies, a video frame is compressed. The network downstream, however, expects a calm, bounded stream. The leaky bucket sits between the chaos and the calm and acts as a shock absorber.
The algorithm was described by John Turner in 1986 as part of ATM network research, and independently formalized shortly after. Despite being nearly four decades old, it remains the conceptual core of rate limiters in routers, cloud APIs, and operating system schedulers. Its dual, the token bucket, allows controlled bursting; the leaky bucket refuses all bursting and enforces a strict constant output rate.
Comments
Loading comments...