Congestion_Control_Algorithm
Congestion_Control_Algorithm
When too many packets are present in (a part of) the subnet, performance
Leaky Bucket
Fig
ure : Leaky Bucket Algorithm
For many applications, it is better to allow the output to speed up somewhat when large
bursts arrive, so a more flexible algorithm is needed, preferably one that never loses data.
One such algorithm is the token bucket algorithm.
Tokens arrive at the constant rate in the token bucket.
If the bucket is full, tokens are discarded.
A packet from the buffer can be taken out only if a token in the token bucket can be drawn.
The token bucket algorithm provides a different kind of traffic shaping than that of the leaky
bucket algorithm. The leaky bucket algorithm does not allow idle hosts to save up permission
to send large bursts later.
The token bucket algorithm does allow saving, up to the maximum size of the bucket, n. This
property means that bursts of up to n packets can be sent at once, allowing some burstiness
in the output stream and giving the faster response to sudden bursts of input.
Reference