Service Health

Latency, p50, p95 and p99

Latency is how long a call takes. This guide explains percentiles, why an average can hide slow calls and how to interpret the latency figures in Service Health.

What is a percentile?

Imagine sorting 100 call durations from fastest to slowest:

MeasureWhat it describes
p50, the medianThe duration around the middle: half the calls finish within it
p95The duration within which about 95 of the 100 calls finish
p99The duration within which about 99 of the 100 calls finish

If most calls take 100 ms but a few take several seconds, the average can look reasonable while those slow calls are painful. Higher percentiles describe this slow end of the distribution, often called the tail.

For example, p50 of 100 ms and p99 of 2 seconds suggests a very different experience for the slowest callers. A customer making many calls may encounter that tail regularly.

What the app can and cannot infer

Service Health reads source percentiles. When several request names become one API, or several APIs become a service, it combines their percentiles using a call-weighted mean. Busier groups contribute more.

That combined p95 is not an exact p95 of all the underlying requests. Percentiles cannot generally be merged by averaging. Use these figures to locate changes and compare like with like; do not infer an exact slow-call count from an aggregated percentile.

The speed objective avoids that problem: it uses the counted calls exceeding the chosen slow line directly. SLOs explains the distinction.

How to investigate a slowdown

  1. Open the affected service, then its API.
  2. Check whether speed budget started falling at the same time as latency increased.
  3. Open the day to inspect five-minute p95 and p99 points, if they were retained.
  4. Look at What it waits on to separate changes in the API from changes in its dependencies.
  5. Check your source telemetry for the requests behind that time before deciding on the cause.

The app's sustained-slowdown marker looks for p95 over the slow line for 30 minutes. It is a diagnostic clue, separate from the objective's count of slow calls.

Five-minute detail covers at most the last 14 days and only the APIs selected by your connector setting. A chart with daily totals cannot recreate detail that was not kept.

What good looks like

Compare a service with its own history and the response time its users need. A batch job and an interactive checkout do not need identical latency. Long-lived streams and recognised background work are judged on success only, rather than against an interactive speed target.

Learn more