Token Bucket
Both GTS and FRTS use a construct called a token bucket to rate-limit traffic.A
token bucket should be thought of as being filled with tokens, not packets (imagine
tokens as permissions for a specific number of bits to be transmitted to the network).
The token bucket is also commonly referred to as a credit manager that gives
credits to traffic to be used for transmission. Before a packet is sent out the interface,
a certain number of tokens need to be removed from the bucket.Tokens fill
the token bucket at a constant rate, and the bucket is a certain size. After the bucket
is full, newly arriving tokens are discarded. If the bucket is empty, an incoming
packet has to wait for enough tokens to fill the bucket before it can be transmitted.
Thus, with the token bucket analogy, the burst size is roughly proportional to the
size of the bucket. A depiction of a token bucket is shown in Figure 8.4.