I'm trying to review for my final and I'm going over example problems given to me by my professor. Can anyone explain to me the concept of how leaky bucket works. Also Here's a review problem my professor gave to me about leaky buckets.
A leaky bucket is at the host network interface. The data rate in the network is 2 Mbyte/s and the data rate from the application to the bucket is 2m5 Mbyte/s
A.) Suppose the host has 250 Mbytes to send onto the network and it sends the data in one burst. What should the minimum capacity of the bucket (in byte) in order that no data is lost?
B.) Suppose the capacity of the bucket is 100M bytes. What is the longest burst time from the host in order that no data is lost?
Leaky bucket symbolizes a bucket with a small hole allowing water (data) to come out at the bottom. Since the top of the bucket has a greater aperture than the bottom, you can put water in it faster that it goes out (so the bucket fills up).
Basically, it represents a buffer on a network between 2 links with different rates.
Problem A
We can compute that sending the data will take 250Mbyte / (2,5Mbyte / s) = 100 s.
During that 100 s, the bucket will have retransmitted (leaked) 100s * 2Mbyte/s = 200Mbytes
So the bucket will need a minimum capacity of 250MB - 200MB = 50MB in order not to lose any data
Problem B
Since the difference between the 2 data rates is 2.5MB/s - 2.0MB/s = 0.5MB/s, it means the bucked fills up by 0.5MB/s (when both links transmit at full capacity).
You can then calculate that the 100MB capacity will be filled after a burst of 100MB / 0.5MB/s = 200s = 3m 20s