Learn
Lesson · Latency and the Tail · The floors

The Speed-of-Light Floor

Signals in fibre travel at about two thirds of the speed of light, so a round trip over a great-circle distance d cannot take less than 2d ÷ (⅔c), which is 3d/c. New York to London is 55.889 ms and no engineering removes it. What a measurement has above that floor is the part that is queueing, serialisation, middleboxes and software — and it is the only part anyone can fix.

RTT_min = 2d ÷ (⅔c) = 3d/c c is exact by definition NY–London d = 5585 km floor 55.889 ms measured 76 ms 1.360 × the floor remainder 20.111 ms queues, serialisation, middleboxes, code a CDN shortens d. Nothing shortens 3/c.
A floor that is a distance divided by a speed

Core ideas

What this lesson establishes

The hard idea is that one term of a latency measurement is not an engineering quantity at all. It is geography, and the only lever on it is moving the endpoints closer together.

1

The floor is a distance divided by a speed

Light in vacuum travels 299 792 458 m/s, exactly — the metre is defined from it, so c is not measured but fixed. Glass slows it to about two thirds of that. A round trip covers 2d, so the minimum is 2d ÷ (2c/3) = 3d/c, and every figure on this page follows from those two numbers alone.

2

The remainder is the only part you can work on

Subtract the floor from a measurement and what is left is queueing at each hop, the time to clock the bits onto each link, the middleboxes, and your own software. New York to London measured at 76 ms leaves 20.111 ms. That is the whole budget an engineering effort has to work inside, and knowing it stops an argument about the other 55.889 ms.

3

A CDN shortens d and does nothing else

Putting a copy of the content nearer the reader reduces the distance, which reduces the floor, which is a real and large win — for content that can be served from the copy. For a request that must reach the origin to read or change something only the origin knows, the distance is unchanged and so is the floor.

The material

The floor, the remainder, and what shortens which

An exact fraction of a millisecond, and the honest reading of a measurement that sits above it.

Definition · Light-speed floor

The light-speed floor for a route is the shortest possible round-trip time over it: twice the great-circle distance, divided by the propagation speed of a signal in fibre. This course takes that speed as ⅔c, so the floor is 2d ÷ (2c/3) = 3d/c. It assumes a perfectly straight cable and zero processing, and it is therefore a bound nothing beats rather than a prediction.

Because c is exact by definition, so is the floor: for New York to London it is the fraction 8 377 500 000 / 149 896 229 milliseconds, which is 55.889 ms to three places. The course quotes it as 56 ms, and the lab prints the fraction it came from so that the rounding is visible rather than assumed.

d = 5585 km = 5 585 000 m 2d 2 × 5 585 000 3 × 5 585 000 RTT = ────── = ─────────────────── = ─────────────── s ⅔c ⅔ × 299 792 458 299 792 458 = 0.055889… s = 55.889 ms

Set the lab’s measured round trip to 76 ms, which is a plausible figure for that route on a good day. The measurement is 1.360 times the floor, and the unexplained remainder is 20.111 ms. That remainder is the number to take into a meeting. Halving it — which would be an extremely good quarter of work — takes the route from 76 ms to about 66 ms, a saving of thirteen percent.

  • New York → San Francisco, 4139 km — floor 41.419 ms
  • New York → London, 5585 km — floor 55.889 ms
  • Mumbai → London, 7200 km — floor 72.050 ms
  • San Francisco → Tokyo, 8280 km — floor 82.857 ms
  • Frankfurt → Singapore, 10 263 km — floor 102.701 ms
  • London → Sydney, 16 993 km — floor 170.048 ms

What a content network actually buys

A 170 ms floor between London and Sydney is why a service with one region has a bad day in the other hemisphere, and it is why the fix is a second copy of the data rather than a faster anything. This is the honest case for a content network: it does not accelerate a packet, it shortens the route the packet has to take.

Example · The request a CDN cannot help

A reader in Sydney loads a page: the images, the stylesheet and the script come from a nearby cache, and their floor drops from 170.048 ms to whatever the local distance is. Then they post a comment. That write must reach the one place that owns the data, so its floor is 170.048 ms again, and so is the floor on the confirmation. No configuration of the cache changes either number. “Put it on a CDN” is an answer about the first group of requests offered as if it were an answer about the second.

The lab will also let you enter a measurement below the floor, and it prints a negative remainder when you do. That is not a fast network; it is a wrong distance. The usual cause is measuring to a nearby edge node while believing you measured to the origin, which is the same confusion as the example above with the sign the other way round.

Two cautions on the model. The ⅔c figure is a convention — real fibre runs at roughly 0.66 to 0.69 of c depending on the glass — so treat the floor as accurate to a few percent rather than exact in the physical sense, even though the arithmetic that produces it is exact. And real cables are not great circles: they follow coastlines, rights of way and existing ducts, so the true path is longer than d and the true floor is therefore somewhat higher than the one computed here.

Interactive

The floor under a route

What the distance costs, and what is left over to blame on the system

The speed-of-light floor2d ÷ (⅔c), and the part of a measured round trip it does not explain
the flooreverything elsec is exact

Method

Putting a floor under a route

Three lines to the floor, and a fourth that decides whether the remainder is worth anyone’s quarter.

1

Get the great-circle distance, not the cable length

The floor is a lower bound, so it should use the shortest distance that exists, which is the great circle. A real cable is longer and its true floor is higher; using the great circle keeps the bound honest.

2

Compute 3d/c and keep it in milliseconds

Twice the distance at two thirds of c is three times the distance at c. With d in metres and c in metres a second the answer is in seconds, so multiply by a thousand once, at the end.

3

Subtract the floor from what you measured

The difference is the whole of the improvable part. Quote it as a number of milliseconds and as a ratio: 76 ms against a 55.889 ms floor is 20.111 ms of remainder at 1.360 times the floor.

4

Decide what the remainder is worth before optimising it

If the remainder is a fifth of the measurement, then a heroic effort that halves it moves the user-visible number by a tenth. If the remainder is four fifths of the measurement, the same effort is transformative. The ratio tells you which world you are in.

Floors and remainders

Score 0 / 0

A 76 ms measurement between New York and London

One measurement, split into the part that is geography and the part that is somebody’s code.

d 5585 km, great circle floor 3 × 5 585 000 / 299 792 458 s = 8 377 500 000 / 149 896 229 ms (exact) = 55.889 ms measured 76.000 ms ratio 76 / 55.889 = 1.360 remainder 76 − 55.889 = 20.111 ms if the remainder were halved: 55.889 + 10.056 = 65.945 ms saving 10.055 ms, or 13.2% of the measurement

The remainder is 26% of the measurement, so the very best possible outcome — removing every queue, every middlebox and all the software — is a 26% improvement. That is the ceiling on the whole category of work, and it is worth knowing before the work starts.

The same arithmetic run the other way is how you decide to place a second region. If the target is a 100 ms round trip, then 3d/c ≤ 100 ms gives d ≤ 9993 km, and every user further away than that cannot be served inside the target from this location no matter what is built. That is a siting decision falling out of one division.

For a faded rehearsal, take Frankfurt to Singapore at 10 263 km with a measured round trip of 165 ms. The supplied first move is the floor, which the lab prints as 102.701 ms. Compute the ratio and the remainder, then say what fraction of the measurement the best possible engineering effort could remove, and whether a 120 ms target is reachable from Frankfurt at all. Write the answer down before opening the quiz.

Common mistakes

1
Quoting a one-way figure as a round trip2d is in the numerator because the signal has to come back. The one-way minimum from New York to London is 27.944 ms; the round trip is 55.889 ms. Anything that halves the expected answer without changing the distance is this error, and it makes every budget built on it twice as generous as it should be.
2
Using c instead of ⅔cIn vacuum the New York to London round trip would be 37.259 ms. In fibre it is 55.889 ms, half as much again. The glass is not a detail: it is the difference between a floor that is comfortably under a target and one that is not.
3
Offering a cache as the answer to a request that must reach the originA nearby copy shortens the distance for anything that can be served from the copy, and does nothing at all for a write, a personalised response, or a read that must be current. Both kinds of request usually exist in the same product, and the floor is the number that separates them.

Check your understanding

✓
Finish when a latency figure splits, in your head, into a floor and a remainder.

You should be able to compute 3d/c for a route, express a measurement as a multiple of that floor, state the remainder in milliseconds, and say which proposed changes can move it and which cannot.

Note: The floor is one round trip. A first page load usually pays for several of them in sequence, and “Round Trips, Not Bytes” counts them: at this route’s measured 76 ms, four sequential handshakes cost more than three hundred milliseconds before any content moves at all. The floor computed here reappears as a fixed, non-negotiable line item in “Latency Budgets”.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.