Link to home
Start Free TrialLog in
Avatar of alyamama
alyamama

asked on

Leaky Bucket and Token Bucket

Differences between Leaky Bucket and Token Bucket algorithms in terms of:
1. Bucket content;
2. Loss packets (or bytes)
3. Burst handling n(state the burst size and duration);
4. Output traffic shape Leaky Bucket and Token Bucket algorithms in terms of:
Avatar of deibel
deibel
Flag of Germany image

Token Bucket:
the tokens flow with rate r INTO a bucket. the bucket has a capacity of c. are there more tokens than the number of c, packet will be lost. so the "size" c of the bucket limits the bursts. and r limits the long-term-datarate.

to send a packet of the size s, there have to s tokens in the bucket. if there are less, the packet will be delayed.

Leaky Bucket:
in difference to token bucket, the OUTPUT of the bucket is limited to a rate r. it also has a capacity c. bursts at the output of the bucket are not possible. bursts at the input are smoothed due to the caching in the bucket. the max burst is c


refer to this, but it is in german and needs java6:
http://www.nt.fh-koeln.de/fachgebiete/inf/vogt/mm/buckets/Applet.html

hope this helps. its a bit difficult for me to explain it in english
i found that on wikipedia:

Two predominant methods for shaping traffic exist: a leaky bucket implementation and a token bucket implementation. Sometimes they are mistakenly lumped together under the same name. Both these schemes have distinct properties and are used for distinct purposes [1]. They differ principally in that the leaky bucket imposes a hard limit on the data transmission rate, whereas the token bucket allows a certain amount of burstiness while imposing a limit on the average data transmission rate.


http://en.wikipedia.org/wiki/Token_bucket#Traffic_shaping_algorithms_.28leaky_bucket_versus_token_bucket.29
Avatar of alyamama
alyamama

ASKER

Thank You,
my pleasure,
do you need further explanation?
ASKER CERTIFIED SOLUTION
Avatar of deibel
deibel
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial