Goseeko blog

What is the Leaky Bucket Algorithm?

by Bhumika

The Leaky Bucket Algorithm is primarily responsible for controlling the total volume and rate of traffic supplied to the network.

Let’s have a look at how the Leaky Bucket Algorithm works.

Leaky Bucket Algorithm

Step1: Consider a bucket with a small hole at the bottom into which water is poured at a variable pace, but which leaks at a constant rate.

Step2: So (as long as there is water in the bucket), the rate at which water leaks is unaffected by the pace at which water is poured into the bucket.

Step3: If the bucket is full, any more water that enters will pour over the edges and be lost.

Step4: The same technique was apply to network packets. Consider the fact that data is arriving at varying speeds from the source. Thus, Assume a source transmits data at 10 Mbps for 4 seconds. Moreover, For the next three seconds, there is no data. For 2 seconds, the source transfers data at an 8 Mbps pace. Thus, 68 Mb of data sent in less than 8 seconds.

As a result, if you employ a leaky bucket technique, the data flow will be 8 Mbps for 9 seconds. As a result, the steady flow is maintained.


  1. Firstly, Each host is connect to the network via a leaky bucket interface, which is a finite internal queue.
  2. When space in a queue becomes available, a packet will sent from a store application.
  3. A new packet sent from an application is discard when the queue is full.
  4. The host operating system creates or simulates this hardware configuration.
  5. Packets are queue and release at regular intervals and in the same amount, reducing the likelihood of congestion.

Interested in learning about similar topics? Here are a few hand-picked blogs for you!

You may also like