Token Bucket - The Token Bucket Algorithm

The Token Bucket Algorithm

The algorithm can be conceptually understood as follows:

  • A token is added to the bucket every seconds.
  • The bucket can hold at the most b tokens. If a token arrives when the bucket is full, it is discarded.
  • When a packet (network layer PDU) of n bytes arrives, n tokens are removed from the bucket, and the packet is sent to the network.
  • If fewer than n tokens are available, no tokens are removed from the bucket, and the packet is considered to be non-conformant.

Read more about this topic:  Token Bucket

Famous quotes containing the words token and/or bucket:

    It doesn’t make any difference how much money a father earns, his name is always Dad-Can-I.... Like all other children, my five have one great talent: they are gifted beggars. Not one of them ever ran into the room, looked up at me, and said, “I’m really happy that you’re my father, and as a tangible token of my appreciation, here’s a dollar.”
    Bill Cosby (20th century)

    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)