# Leaky bucket concept

Leaky bucket is a flow-control mechanism designed to reduce the effect of the inevitable variability in input data streams as they are "injected" into communication networks.

The leaky bucket algorithm performs the following functions:

- It controls what the encoder can inject into the network.
- It prevents the data "bucket" from overflowing by automatically regulating the bit rates in the event that the encoder generates too much data or very complex data.
- It prevents “burstiness” in the input stream, ensuring a smooth, even data flow.

![leaky bucket](/_machine-assets/89310f4a8423364242c4573eaa4d19de26f50f1f00947d23696121762025dd83.jpg)
_Leaky bucket algorithm_
