Try
↑ ↓ move↵ openesc close
In this lesson · topic 3 of 7
  1. 1. Why put a buffer in the middle
  2. 2. Capacity, full-queue policy and Little's law
  3. 3. Bursts against a 200-message buffer
  4. 4. Why a bigger buffer only adds delay
  5. 5. Watch the age of the oldest message
  6. 6. One slow message holds up the line
  7. 7. Sizing, waiting and dropping: three checks

Topic 3

Bursts against a 200-message buffer

7 min read

Bursts against a big buffer

The lab below starts with bursty traffic at two thirds of the consumers’ capacity and a buffer of 200 messages. The left picture shows the queue and the consumers. The charts track how many messages are waiting, and how long the messages that just reached a consumer had waited. The line under the pictures shows Little’s law with each side measured separately.

Predict before you press play

Keep this traffic and shrink the queue capacity from 200 to 10. What changes most?

ρ = λ / (c × μ)= 6.0 / (3 × 3) = 0.67messages per second. Bursts push the rate above this for a few seconds at a time.

Drop the newest

producers0 / 200queueconsumersdropped 0
waiting now
0peak 69
dropped
00%
mean wait
3.0s
held by producers
0

L = λ W14.47 vs 4.87 × 2.97 = 14.47L: queue depth averaged over time. λ: messages admitted per s. W: mean time in the queue.

Queue depth over time, limit 200
Queue depth over time, limit 200. Text version available below the chart.02550751001 s16 s30 ssimulated timemessages waiting
Wait time of messages that just reached a consumer
Wait time of messages that just reached a consumer. Text version available below the chart.0.02.55.07.510.01 s16 s30 ssimulated timeseconds

Full-page version with guided experiments: Queue buffer lab.

Things to try

  1. Drag the capacity down to 10 and back. Watch the depth chart hit its ceiling in each burst.
  2. Set burstiness to 1. The same average rate now produces a short queue, and the depth chart is nearly flat.
  3. Raise the producer rate past the consumers’ combined speed. The depth no longer comes back down between bursts.
  4. With the rate past capacity, add consumers one at a time until the queue drains again.
  5. Switch the full-queue policy, or use Compare all policies, and read how wait, drops and held-back messages differ.

The full-page lab has five guided experiments you can apply with one click.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms