All glossary terms

Serving

Request queueing

Requests line up when they arrive faster than the server admits them. Queue depth warns that capacity is short, and it shows before GPU metrics do.

When requests arrive faster than the server can admit them, they wait in a queue - and the queue is where the user's latency goes before anything on the card even moves. Servers queue on purpose: admitting beyond the KV cache capacity causes preemption and recomputation, which is slower than waiting, so a bounded queue plus an admission limit is the honest design.

The size of the wait is tractable arithmetic, not mystery. Little's law ties the number of requests resident to the arrival rate and the time each request spends inside: arrival rate times sojourn. Queue depth therefore warns early - it grows when arrivals outpace service, before GPU gauges look busy and long before the SLO breach reports.

The fixes are ranked by how much they cost. Shed load early with a clear rejection instead of letting every user absorb a growing wait; move work that is not latency-critical out of the interactive queue; add replicas when arrival rate stays above what admission allows; and route or batch smarter when the problem is scheduling rather than raw capacity. What you must not do is admit everything and let the cache sort out the casualties.

A worked example

A server receives 10 requests per second on average, and each request spends 0.5 s from arrival to completion inside the server. Measured p95 wait runs about twice the average.

  1. Little's law: requests resident = arrival rate x time spent = 10 x 0.5 = 5 requests in the system.
  2. If arrivals double to 20 per second against the same 0.5 s of service, the resident count climbs toward 10 and wait times grow with it.
  3. At the doubled arrival rate the queue drains only if the server cuts sojourn time below 0.05 s per request - so capacity, not luck, has to change.

Queueing is arithmetic, not mystery: arrival rate times sojourn time says how many requests are resident, and a rising depth is the capacity warning.

Where this shows up

Test yourself

Related terms