Learn

VISUAL GUIDE · FOUNDATIONS & ESTIMATION

Follow a web request

Step 4 of 10: Agree on encryption

STEP 4 / 10ORIGINAL SKETCH
connect, GET /BrowserMumbaiDNS resolvercaches answersAuthoritativeDNSApp serverVirginia!
A browser looks up a name through a DNS resolver, opens a connection to a distant app server that queries a database, and later goes through a nearby edge that keeps a warm connection to the server.

Where the time goesIllustrative · see assumptions

  • DNS lookup80 ms
  • TCP handshake200 ms
  • TLS 1.3 handshake (1 round trip)200 ms

Total ≈ 480 ms

4 / 10
  1. Slow page
  2. DNS lookup
  3. TCP setup
  4. TLS setup
  5. Request sent
  6. Server work
  7. Response
  8. Reuse
  9. Nearby edge
  10. Fix the query

STEP 4 OF 10 · TLS SETUP

Agree on encryption

HTTPS adds a TLS handshake on top of TCP. The two sides agree on keys and the browser checks the server's certificate. With TLS 1.3 that is one more round trip; older versions needed two.

So before the browser has asked for the page at all, it has spent about 480 ms: DNS plus two trips across the ocean.

Why it matters. Connection setup is a fixed cost per new connection. That is exactly what connection reuse and nearby edges attack later in this guide.