Aglet

How to diagnose API latency variance by request shape and route

API latency variance is a consistency problem: some requests finish quickly while others with the same endpoint wait much longer. This triage guide groups traces by route, input shape, response size, status, and execution interval to find the first dimension associated with the spread.

Establish what is happening

  1. Define the affected request and action

    Record method, route, client workflow, request shape, response status, response size, account or dataset class, and the first user action waiting on the response. Preserve correlation identifiers and timestamps for representative fast and slow requests while redacting secrets and sensitive values.

  2. Split each request into intervals

    Compare queue or admission wait, application handling, database work, external dependency time, response serialization, and network transfer where measured. Use the same clock or document clock boundaries. Mark missing intervals as unknown; a large total alone cannot identify the source of variance.

  3. Group fast and slow traces

    Compare latency distributions by route, payload fields, result count, status, cache state, data size, and release window. Look for a dimension shared by slow traces rather than selecting the single slowest request. Confirm whether variance is present in one workflow or across shared request infrastructure.

What to carry forward

Return a variance scope statement with representative fast and slow traces, the grouping dimension, first measured divergent interval, and uncertainty. Route the next work to admission, application, data, dependency, serialization, or transfer. Stop when one comparison can falsify the leading explanation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow