by Samy (Kondasamy Jayaraman)

Module 27 · Opening a web page

Beginner · by Samy (Kondasamy Jayaraman)

Every handshake costs a round trip

Between a click and a page, a browser looks up a name, shakes hands twice, seals the line and asks for every file, each a trip across the map. Here you follow Larkspur’s customers, near and far, and make the page fast for all of them.

Read as

The whole idea in one example

Wen’s page, two ways

HTTP/1.1, full handshakes

14 trips

2,060 ms

8,000 km each way, a lost packet on top.

HTTP/3, resumed

7 trips

1,380 ms

Fewer round trips, the same road.

Waits come from a simulator: Larkspur’s own customers and planning numbers, not a measurement of any real network or browser.

How it works

Four ideas carry the module

  1. 1 A name to a number

    The directory answers office by office

    DNS names form a tree held in parts by many name servers; a resolver that knows nothing better starts at the root’s servers and follows each referral closer to the name (RFC 1034).

    Source, checked 25 October 2026

  2. 2 Hello, hello, ready

    A handshake costs a round trip

    TCP opens a connection with a three-way handshake, SYN, SYN-ACK, ACK, and hands data to the application only once the connection is established (RFC 9293).

    Source, checked 25 October 2026

  3. 3 Lost in the post

    A lost packet waits out a timeout

    Before it has measured a round trip, a TCP sender waits 1 second for an acknowledgement, and it rounds any shorter computed timeout up to 1 second, then resends (RFC 6298).

    Source, checked 25 October 2026

  4. 4 The sealed envelope

    TLS seals the line and checks the name

    For https, the browser checks that the certificate matches the name it asked for, to stop anyone impersonating that server (RFC 9110).

    Source, checked 25 October 2026

The story

Larkspur’s shop, from near and far

Larkspur Supply Co.’s customers open its shop from near and far; the team follows each round trip from the name to the last photo, and makes the page fast for all of them. You’re on the team that runs the shop.

Played Caching & CDNs? This is what happens on each of its round trips.

4
customers, from next door to across the map
6
files on larkspur.example’s home page
8,000 km
from Wen’s house in Farhaven to the shop
1,500 ms
the owner’s budget for every customer’s page

Your path

The chapters

  1. Chapter 1

    A name to a number

    How does a browser turn a name into an address?

  2. Chapter 2

    The remembered answer

    How long should an answer be remembered?

  3. Chapter 3

    Hello, hello, ready

    What does opening a connection cost, and why does distance matter?

  4. Chapter 4

    Lost in the post

    What does one lost packet cost?

  5. Chapter 5

    The sealed envelope

    What does HTTPS add, what does it cost, and what does the padlock prove?

  6. Chapter 6

    One line, many files

    How do HTTP/1.1, 2 and 3 fetch many files, and what does a loss do to each?

  7. Chapter 7

    Make the page fast for everyone

    Which settings get every customer’s page in on time, and let a move be found?

Who it’s for

  • Engineers
  • Product managers
  • Analysts
  • No code needed

Anyone whose product is a web page, and who wants to know where the wait goes before it appears: the lookup, the handshakes, a lost packet and the files. No background needed.