When will the queue empty?

Size a photo-preview worker pool and see how long a burst delays recovery.

Set the workload

The queue starts empty. Arrivals are evenly spaced, workers run at a constant rate, and each photo creates one job.

Pending photo jobs over time
Backlog rises to 800 jobs at 10 seconds and falls to zero at 50 seconds.

0 to 70 seconds · vertical scale 0 to 800 jobs

Pending at burst end
800
Worker capacity
20 jobs/s

The queue drains 40 seconds after the burst.

Predict before you test

Four workers handle 80 jobs per second. If 120 arrive each second for 30 seconds, then arrivals fall to 60 per second, how long does recovery take?

Reveal the calculation

The burst leaves (120 − 80) × 30 = 1,200 jobs waiting. Afterward, the workers clear 20 extra jobs each second. The queue empties 60 seconds after the burst. Set later arrivals to 80 and the backlog stays at 1,200 even while individual jobs finish.

Return to the queue lesson