Glossary

Latency

Latency: definition

Latency is the elapsed delay between the start of an operation and the point at which its result or response is observed. The definition is incomplete unless the start and end points are explicit: client-to-server network delay, server processing time, database query duration and full browser navigation time are all different latency measurements.

How latency is measured

Latency is usually expressed in milliseconds or seconds. For request traffic, a distribution is more informative than a single average. Percentiles such as p50, p95 and p99 show how the median and slower portions of the population behave. Averages can look healthy while a small but important group of requests is much slower.

Example: if p95 latency is 800 ms, 95% of the observations completed in 800 ms or less and the slowest 5% took longer. That does not mean every slow request took exactly 800 ms.

Why latency matters

Latency affects user experience, queueing, resource occupancy and the time required to recover from dependent services. In a distributed system, delays can compound across several calls. A slow dependency may also trigger retries, which can increase load and make the original latency problem worse.

Common interpretation mistakes

  • Comparing latency values that use different start and end boundaries.
  • Looking only at averages and missing tail latency.
  • Mixing successful and failed requests without separating the failure mode.
  • Ignoring route, region, version or dependency labels that explain a localized regression.
  • Assuming high latency identifies the cause; it identifies a symptom that still needs diagnosis.

How to use latency in monitoring

Measure latency at the layer that represents the outcome you care about, then attach diagnostic context. For an API, that may mean request duration by route and status code plus traces. For a website, browser field data can show what real users experience while synthetic checks provide a repeatable external view.

Latency vs response time

The terms are sometimes used interchangeably, but teams should define them in their own instrumentation. “Latency” may refer to one segment of delay, while “response time” can mean the full time from request to completed response. Consistent naming matters more than choosing one universal vocabulary.

Related concepts

Short answer

Latency is a measured delay. Define its boundary, inspect a distribution rather than only an average, segment it by useful context, and connect high latency to traces, logs or other evidence before deciding what caused it.

Practical checklist

  • State the exact start and end event for the measurement.
  • Track a distribution such as p50/p95/p99 rather than only an average.
  • Segment by route, region, dependency or release before escalating.
  • Use traces or server timing to distinguish symptom from cause.

Sources and further reading