Continue where you left off ×
One click, every layer (what happens when you load a page)
The Parcel's Journey · Open board
One parcel tracked from a laptop to example.com. This lesson follows the same trip again, and this time stops at every counter the parcel passes on the way.
Before you start. This lesson holds the whole track at once. The concierge who turns a name into an address is DNS Resolution . The depots that pass a parcel one hop closer are How a parcel finds any house on earth , the doorman in your own building is Inside your building (your router's life) , and one address answering from many buildings is One address, a thousand doors . The phone call and its three-message handshake are TCP vs UDP, and the 3-way handshake , and how it recovers a lost page is The page that never arrived (TCP reliable delivery) . The whisper code is The whisper code (how a call goes private) , the words of the order are What a request actually says (HTTP) , one line shared by many orders is How the web outgrew the phone call , and a sender starting almost silent is Reading a book aloud to America .
The idea in 30 seconds
A page load is a chain of waits: find the address, open the call, make it private, send the order, receive the body. curl -w times each one.
On this line one round trip is about 13 ms, and a cold page costs about four of them before the first byte: DNS, TCP, TLS, the request.
Every packet in that chain, the DNS question included, rides the same depot-to-depot route under it, through your own router’s NAT, to the nearest anycast building.
Time to first byte is the moment the answer starts. For a small page it is almost the whole load, because the body fits in the first window.
A single lost packet turns a 13 ms stop into a one-second one, which is why the same page can take 84 ms or 1.1 s from the same desk.
The interview answer is those stops in order, each with the one mechanism that makes it work.
Read the story
Lesson 36 of 44 in Networking
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson 23 June 2009: Google slows its own page down, on purpose One click on example.com, timed: 84 ms in five pieces Stop one: the concierge finds the address (DNS, 18 ms) Under every stop: twelve depots and a doorman Stop two: the phone call opens (TCP handshake, 13 ms) Stop three: the whisper code (TLS, 27 ms) Stop four: the order, and the first byte back (TTFB, 24 ms) Stop five: the body, and why it was free (slow start, 0.6 ms) The two-minute answer How the capture was made 84 ms, split into wire and not-wire The same page, three times slower, from the same desk The body grows with the file Terms it explains: round trip, time to first byte, TTFB.
Review Networking
Mark as read Saved in this browser, and to your account when you sign in.