Token Bucket Regulation: Duration of Full-Rate Transmission

Token Bucket Regulation: Duration of Full-Rate Transmission

Verified Sources
Nov 4, 2026

In a token bucket regulator, the system “spends” tokens to allow sending at the link’s line rate (here 66 Mbps). Tokens are generated continuously at a fixed token generation rate and stored up to a maximum bucket capacity.

Key idea: when the computer transmits at full 66 Mbps, it consumes tokens at 66 Mbps; meanwhile, new tokens are added at 11 Mbps. Thus, the bucket level decreases at the net rate (6−1)=5(6-1)=5 Mbps. The time you can keep transmitting at full 66 Mbps is determined by how long it takes for the initial stored tokens (capacity) to be depleted.

Model the token level in bits:

  • Initial tokens: 88 megabits
  • Token arrival (fill) rate: 11 Mbps
  • Token consumption at full send: 66 Mbps

So, time=initial tokensconsumption rate−fill rate=8 Mb6 Mbps−1 Mbps=85 s=1.6 s\text{time}=\frac{\text{initial tokens}}{\text{consumption rate}-\text{fill rate}}=\frac{8\ \text{Mb}}{6\ \text{Mbps}-1\ \text{Mbps}}=\frac{8}{5}\ \text{s}=1.6\ \text{s}

Mermaid intuition (token level over time while sending at full rate):

Therefore, the computer can transmit at the full 66 Mbps for 1.61.6 seconds.

Token Bucket Traffic Shaping (Conceptual Tutorial)

Compute maximum full-rate transmission time under token bucket

  1. 1
    Step 1

    Let initial tokens (bucket capacity) be B=8B=8 Mb, token generation rate be r=1r=1 Mbps, and full link rate be R=6R=6 Mbps.

  2. 2
    Step 2

    While sending at full RR, tokens are consumed at RR but added at rr, so net drain rate is R−r=6−1=5R-r = 6-1 = 5 Mbps.

  3. 3
    Step 3

    Transmission can continue at full rate until tokens reach 0, so t=fracBR−r=frac85=1.6 st= frac{B}{R-r}= frac{8}{5}=1.6\ \text{s}.

  4. 4
    Step 4

    Maximum full-rate burst duration is 1.61.6 seconds.

Pro Tip: Use the net drain shortcut

When the sender is at full link rate RR, tokens decrease at rate (R−r)(R-r). If the bucket starts full with BB bits, then the full-rate duration is simply t=B/(R−r).t=B/(R-r).

Warning: Assumes bit-for-bit token spending

This solution assumes the regulator consumes tokens proportionally to transmitted bits (i.e., 66 Mbps of sending consumes 66 Mbps worth of tokens). If your course uses a packet-based model (tokens per packet size), you must convert to “tokens per packet” and incorporate packetization.

Token bucket burst lifecycle at full 6 Mbps

Bucket initially full

t = 0

Tokens start at 88 Mb."

Transmit at full line rate

0 < t < 1.6s

Consumption 66 Mbps; generation 11 Mbps; net drain 55 Mbps."

Bucket empties

t = 1.6s

Tokens hit 00, so transmission at full 66 Mbps can no longer be sustained."

Constrained by token replenishment

t > 1.6s

Transmission must slow (or pause) to match available tokens."

Token rates during full-rate transmission

Consumption vs generation determine the net drain

Key concepts & common pitfalls

Knowledge Check

Question 1 of 4
Q1Single choice

A token bucket has initial tokens B=8B=8 Mb, fill rate r=1r=1 Mbps, and the sender transmits at line rate R=6R=6 Mbps. How long can it sustain full 66 Mbps?