Latency With and Without Queue Delay

A request's elapsed time may include waiting before processing starts. Measuring both intervals helps identify the dominant cost.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace 90 milliseconds
  2. Check load conditions
  3. Time a request before it reaches a worker
  4. Use boundaries tied to the user experience

Trace 90 milliseconds

If a task waits sixty and executes for thirty, its pre-response duration is ninety before other overhead. Halving processing time removes fifteen under this simplified model. See queue delay and service time.

Check load conditions

At low arrival rate, the same task might have almost no queue wait. Record concurrency and arrival profile alongside individual timing. Backpressure describes a policy that can affect that delay.[1]

Time a request before it reaches a worker

A job takes four milliseconds of service once it begins. Under load it spends seventeen milliseconds waiting. The response time from arrival is twenty-one milliseconds in a model with no further delays. Timing only inside the handler measures four. See service queue delay.

Arrival at 0 ms
Service starts at 17 ms
Completion at 21 ms
Queue delay 17, service 4, observed latency 21

Use boundaries tied to the user experience

Queue admission and end-to-end budgets can be separate. Track requests that are rejected or never complete in the observation window. Compare lightly loaded and near-capacity cases.

References

  1. Google, Site Reliability Engineering ↩