Learn

VISUAL GUIDE · FOUNDATIONS & ESTIMATION

Follow a web request

Step 7 of 10: The response travels back

STEP 7 / 10ORIGINAL SKETCH
connect, GET /SQL queryHTMLBrowserMumbaiDNS resolvercaches answersAuthoritativeDNSApp serverVirginia!Database!
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 handshake200 ms
  • Request travels100 ms
  • App code30 ms
  • Slow query400 ms
  • Response travels100 ms

Total ≈ 1110 ms

7 / 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 7 OF 10 · RESPONSE

The response travels back

The server sends 200 OK with the HTML. The first bytes need another half round trip, about 100 ms, to reach Mumbai.

Add it up: roughly 1,110 ms before the browser can start drawing. About 600 ms is distance, 400 ms is one query, 80 ms is DNS and only 30 ms is the app code everyone wanted to rewrite.

Why it matters. With the full breakdown on paper, each fix has a number attached. Bigger servers would shave a few ms from the 30 ms slice.