Work Queues

A queue separates who asks for work from who does it, so a slow job never blocks a caller.

Callers waiting, no queue200100 per s × 2 s
Callers waiting, queue0enqueue, then return
Rule to keepBound ita full queue pushes back
You gainYou give up
Throughput during burstsAn immediate answer
Independent scaling of workersSimple failure handling, because jobs fail after you return