Token Bucket - Comparison To Leaky Bucket

Comparison To Leaky Bucket

The token bucket algorithm is directly comparable to one of the two versions of the leaky bucket algorithm described in the literature. This comparable version of the leaky bucket is described on the relevant Wikipedia page as the leaky bucket algorithm as a meter. This is a mirror image of the token bucket, in that conforming packets add fluid, equivalent to the tokens, to a finite capacity bucket, from which this fluid then drains away at a constant rate, equivalent to the process in the token bucket algorithm in which tokens are added at a fixed rate.

There is, however, another version of the leaky bucket algorithm, described on the relevant Wikipedia page as the leaky bucket algorithm as a queue. This is a special case of the leaky bucket as a meter, which can be described by the conforming packets passing through the bucket. The leaky bucket as a queue is therefore applicable only to traffic shaping, and does not, in general, allow the output packet stream to be bursty, i.e. it is jitter free. It is therefore significantly different from the token bucket algorithm.

These two versions of the leaky bucket algorithm have both been described in the literature under the same name. This has led to considerable confusion over the properties of that algorithm and its comparison with the token bucket algorithm. However, fundamentally, the two algorithms are the same, and will, if implemented correctly and given the same parameters, see exactly the same packets as conforming and nonconforming.

Read more about this topic:  Token Bucket

Famous quotes containing the words comparison, leaky and/or bucket:

    What is man in nature? A nothing in comparison with the infinite, an all in comparison with the nothing—a mean between nothing and everything.
    Blaise Pascal (1623–1662)

    A leaky faucet, a barking dog—those are things you tolerate.
    Candace Gingrich (b. c. 1967)

    Dear fellow-artist, why so free
    With every sort of company,
    With every Jack and Jill?
    Choose your companions from the best;
    Who draws a bucket with the rest
    Soon topples down the hill.
    William Butler Yeats (1865–1939)