latency

The time between asking for something and getting the answer back.

In more detail

For a network call it includes the travel time both ways plus the time the other side spends working. Many small calls made one after another add their latencies together, which is why chatty designs feel slow.

Examples

In AWS: The time a request or packet takes to get where it is going and back, usually measured in milliseconds.
In Kafka, linger.ms and acks=all both add latency to each record.
In the browser: Latency is waiting time rather than download speed. A page made of small files can still feel slow if every request pays a long delay for connection setup, which is why caching and preconnect matter.
In Node.js, a blocked event loop adds latency to every request waiting behind it.
Waterfalls multiply latency in React data fetching; optimistic UI and parallel fetching reduce how much users notice.
The N+1 query problem is slow because each extra query adds its own latency.
Main memory is about 100 nanoseconds, a round trip inside a datacenter about half a millisecond, a round trip across an ocean about 150 milliseconds.
In this course: Latency is a distribution, not one number: most requests may be fast while a few are very slow. Report it as percentiles alongside request count and error rate.

Related terms

Taught in

References

Certification courses