Lessons 1/4 · 20 min
One tap, four operations
Where did the two seconds go?
Kofi, in Douala, taps a link to his mobile-money statement. The screen stays white for two seconds, then the page appears. What did his phone do in the meantime? To answer with something better than "the internet is slow", you need to know that opening a page is made of four successive operations, each of which can fail or slow down independently of the others.
1. DNS name -> address shop.bac.example -> 203.0.113.20
2. TCP address -> connection three messages: SYN, SYN-ACK, ACK
3. TLS connection -> private keys agreed, certificate checked (https only)
4. HTTP connection -> request GET /statement -> 200 + the dataThe addresses in this workshop are fictitious: 203.0.113.0/24 is a range reserved for documentation, and the .example domain does not exist on the real internet.
The four phases in one sentence each
- DNS (Domain Name System): a directory. The network can only deliver to numeric addresses, so you ask a server called a
resolverwhich address matches the name. - TCP (Transmission Control Protocol): you open a reliable channel between two programs, a bit like picking up the phone and hearing "hello?" before you speak.
- TLS (Transport Layer Security): you agree on secret keys and check a
certificateso that the conversation is private and tied to one named server. This phase only exists forhttpsaddresses. - HTTP (HyperText Transfer Protocol): finally the useful conversation. The client sends a few lines of text ("give me
/statement"), the server answers with a code (200= success,404= not found) and some data.
A worked example
Assume a round trip (RTT, round-trip time: how long a message takes to reach the server and for the reply to come back) of 100 ms to the server, and a nearby resolver that already knows the answer (30 ms). In the usual case, with no connection already open:
| Phase | Round trips | Duration |
|---|---|---|
| DNS (nearby resolver, answer cached) | 1 to the resolver | 30 ms |
| TCP: SYN, SYN-ACK, ACK | 1 to the server | 100 ms |
| TLS 1.3 (full handshake) | 1 to the server | 100 ms |
| HTTP: request, then start of the reply | 1 to the server | 100 ms |
| Total before the first useful byte | 330 ms |
This calculation is a simplified model, not a measurement: it ignores the server's processing time, the size of the reply and packet loss. It still shows the essential point: three of the four phases each cost a full round trip to the server, however little data moves. Browsers reduce this cost by reusing connections that are already open and by caching DNS answers (keeping them in memory); HTTP/3 even merges the opening of the transport with the cryptographic phase. We study the classic path because the newer variants are understood as shortcuts of it.
What each phase guarantees — and does not
| Phase | Guarantees | Does NOT guarantee |
|---|---|---|
| DNS | that you received an answer | that the answer is true (classic DNS is unauthenticated) |
| TCP | that bytes arrive, in order, with no silent loss | that nobody reads them on the way, nor who is at the other end |
| TLS | confidentiality, integrity, identity of the named server | that this server is honest, nor that its name stays hidden |
| HTTP | a structured request and a coded reply | anything about the truth of the content |
Recap
Opening a page = DNS, then TCP, then TLS, then HTTP. Each phase costs time (often one round trip) and gives a narrow guarantee. Use the interactive diagram below: step through it and note, at each step, what an observer sitting on the path can read.
Interactive tool
Journey of a web request
Four steps between typing an address and seeing the page, and what someone listening on the network (public Wi-Fi, ISP) sees at each step.
Step 1 of 4
DNS lookup
The browser asks a resolver for the IP address of example.org (A/AAAA query).
What an on-path observer sees
HTTP (unencrypted)
- The name asked for (example.org) and the IP returned, in the clear on port 53, unless encrypted DNS is used.
- Who queries which resolver, and when.
HTTPS (TLS)
- Same: HTTPS does not protect the DNS query. The name is visible unless encrypted DNS (DoH, DoT, DoQ) is enabled.
- With encrypted DNS: the observer only sees that you talk to your resolver, not the name or the answer. The resolver itself still sees the name.
"On-path observer": a third party who reads traffic without being one of the two endpoints (Wi-Fi network, ISP, intermediate router). They do not see what the server itself sees.
