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:

    Clay answered the petition by declaring that while he looked on the institution of slavery as an evil, it was ‘nothing in comparison with the far greater evil which would inevitably flow from a sudden and indiscriminate emancipation.’
    State of Indiana, U.S. public relief program (1935-1943)

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

    And now, far removed from the loved habitation,
    The tear of regret will intrusively swell,
    As fancy reverts to my father’s plantation,
    And sighs for the bucket that hung in the well.
    Samuel Woodworth (1788–1842)