Open the lab at its preset and read the four selectors down the side: a DNS lookup, a TCP handshake, a TLS 1.2 negotiation worth two round trips, and the request itself. That is k = 5, and at an 80 ms round trip the time to first byte is 400 ms. The 14 kB of HTML then costs 11.2 ms at 10 Mbit/s. The whole request takes 411.2 ms, and 97.3% of it is round trips.
Definition · Round-trip countThe round-trip count k of a request is the number of exchanges that must complete in sequence before the response can begin to arrive. It counts only exchanges on the critical path: work that happens in parallel with something else does not add to k, and that is the whole reason the count is worth taking seriously rather than simply totalling the protocol’s messages.
k = 1 (DNS) + 1 (TCP) + 2 (TLS 1.2) + 1 (request) = 5
TTFB = k × RTT = 5 × 80 = 400.0 ms
bytes = size × 8 / (Mbit/s × 1000)
= 14 000 × 8 / (10 × 1000) = 11.2 ms
total = 411.2 ms
ratio = 400 / 11.2 = 35.7 ×
The ratio is the number that settles the argument. The round trips cost 35.7 times what the payload costs, so a proposal to halve the HTML saves 5.6 ms of a 411.2 ms request — about one and a third percent — while removing a single handshake saves 80 ms, or nineteen percent. Removing one round trip is worth as much as deleting 100 kB on this link, and the HTML is 14 kB.
The crossover payload
The two terms are equal when the payload reaches k × bandwidth × RTT, which here is 5 × 100 kB = 500 kB. Below that the round trips dominate and above it the bytes do. A 14 kB document is a thirty-fifth of the way there, which is why the byte count is not the lever; a 4 MB video segment on the same connection is eight times past it, and for that one the bytes are the whole story.
Example · The same request with the handshakes removedCache the DNS answer, reuse the connection, and the only exchange left is the request itself: k = 1. Time to first byte falls from 400 ms to 80 ms and the total from 411.2 ms to 91.2 ms — a saving of 320 ms, which is 78% of the original. Nothing about the payload changed, and nothing about the link changed. Four exchanges were removed from the front of the request.
- DNS — one round trip, and zero once the answer is cached
- TCP — one round trip to open the connection, and zero when an open one is reused
- TLS — two round trips in version 1.2, one in 1.3, and zero on a resumed session
- the request — one round trip, and it is the only one that carries your data
Every entry in that list except the last is overhead that a well-configured client and server pay once and then stop paying. This is the reason a site feels slow on the first page and fast on the second, and it is why the measurement to trust is the cold one.
The misconception this lesson exists to name is optimising the term you are not paying. Shaving bytes when k·RTT is thirty-five times the byte cost is work that will be done carefully, measured honestly, and found to have achieved nothing. Compute the ratio first, and let it choose the work.