Discussion

How does token bucket enforces bursty output traffic?

Leaky bucket and token bucket algorithm are congestion control algorithms.

Congestion control means to stop overwhelming the network.

I understand the leaky bucket algorithm to some extent.

In leaky bucket:

- there is a small hole in the bottom.

- so the output rate is always constant, irrespective of what the input rate is.

- Bursty traffic is thus converted into a uniform traffic by the leaky bucket.

But what is token bucket?

I get that the purpose of token bucket is to allow some bursty output traffic. But I do not get how.

Here are the steps of token bucket algorithm:

- in regular intervals, token are thrown in the bucket.

- the bucket has a maximum capacity.

- if there is a ready pakcet, a token is removed from the bucket, and the packet is sent.

- if there is no token in the bucket, the packet cannot be sent.

I do not see traffic enforcement scenario in this definition. How does token bucket differ from leaky bucket exactly?

1 points shivajikobardan 9 months ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton