Learn

VISUAL GUIDE · FOUNDATIONS & ESTIMATION

Follow a web request

Step 2 of 10: Find the address

STEP 2 / 10ORIGINAL SKETCH
shop.example?on cache missBrowserMumbaiDNS 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 lookup (cache miss)80 ms

Total ≈ 80 ms

2 / 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 2 OF 10 · DNS LOOKUP

Find the address

The browser only knows the name shop.example, so it asks a DNS resolver (usually run by the ISP or a public DNS service) for an IP address. If the resolver has a fresh answer cached, this takes one short hop.

On a cache miss the resolver asks the authoritative DNS server for that domain, then caches the answer for as long as the record's TTL allows. Here that costs about 80 ms in total.

Why it matters. DNS is paid before anything else can start. It is usually small and cached, which is why it is worth knowing it exists rather than worth optimising first.