Concepts and theorems · Intermediate

Round-trip time: the delay of a network round trip

Separate path capacity from round-trip delay, then reason about sequential waits and retransmission timers.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. Measure a round trip rather than capacity
  2. Trace sequential dependencies
  3. Distinguish RTT from the retransmission timeout
  4. Report the scope of the measurement
  5. Ask Logeia about this articleCheck your understanding

Measure a round trip rather than capacity

Round-trip time, or RTT, is the elapsed time between sending information and receiving a corresponding response. A measurement can include propagation, queues along the path, endpoint processing, and the time taken to generate the response. A high-capacity link can still connect locations with a long round trip. Bandwidth describes how much data can be carried per unit time, while RTT describes a delay experienced when waiting for feedback. Increasing bandwidth therefore does not make every kind of communication wait shrink by the same factor.

Trace sequential dependencies

Consider a path with an RTT of eighty milliseconds and three exchanges, each of which must wait for the preceding response before starting. Even a simple model that ignores server processing and data-transfer duration includes about 240 milliseconds of waiting. Independent requests might overlap their waits, but a request that needs a value returned by the previous one cannot simply be launched in parallel. In an application, identify which DNS, connection, TLS, and application steps actually require exchanges. Protocol options and connection reuse can change that sequence, so avoid assuming a universal number of round trips for every request.

Distinguish RTT from the retransmission timeout

TCP uses timing observations to adapt its retransmission timeout, or RTO. Setting RTO equal to the latest observed RTT would react poorly to ordinary variation and could cause unnecessary retransmissions. Smoothed timing and variation estimates help account for uncertainty. Acknowledgments after a retransmission also pose a sampling problem: without additional information, an acknowledgment may be difficult to associate with the original transmission rather than the retransmitted copy. Choosing valid samples is therefore part of estimating RTT. Subtracting an arbitrary earlier send timestamp from an acknowledgment timestamp is not always a sound measurement.

Report the scope of the measurement

An ICMP echo round trip, timing on a TCP connection, and the complete duration of an HTTP request measure different things. Routing, packet treatment, server work, and data size can make their values differ. A useful RTT report names the measured exchange, units, observation period, and distribution, rather than supplying an isolated average. A low mean can coexist with a long tail of slow exchanges. Choose improvements that match the cause: use a nearer endpoint, reuse an established connection, or reduce avoidable serial exchanges. Those changes address different sources of waiting and should be checked against the actual workload.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 10

Choose a learning path