Latency
Definition
Latency is the elapsed time for a single operation to complete, measured from the moment a request leaves the caller until the response arrives.
In practice
Latency is what users feel. It is the sum of every hop on the path: DNS lookup, connection setup, network transit, queueing, processing and serialization. A design that adds a cross-region call or an extra database round trip adds latency on every request.
Averages hide the experience of unlucky users, so latency is reported as percentiles (P50, P95, P99). Queueing makes latency rise sharply as utilisation approaches 100%, which is why a service can look healthy on average while its tail latency explodes.
Example
A request that spends 2 ms in the load balancer, 15 ms in the application and 40 ms waiting on a database query has an end-to-end latency of roughly 57 ms plus network transit.