SrujanChidarla
Open to workResume
Back to writing

Deep dive · interactive

What really happens when you type google.com and hit Enter

I mapped the whole trip — every packet, protocol, and process — into a flowchart with the right shape for every step, phases colored by OSI layer, and the background work most diagrams leave out.

distinct steps
29+
network layers
6
autonomous systems
70k+
end to end
100–500ms

The packet map

Pick a route or something that can go wrong, then play it or step through it yourself. The dot is your request; the clock is roughly how long the trip has taken so far.

Routes
What can go wrong

Cold caches, every step runs once and everything works.

BrowserChrome tab
OS stackkernel · NIC
Home routerNAT · gateway
ISPedge router
DNSresolver · root · TLD
InternetBGP · 10–20 ASes
Google edgeAnycast · Maglev
Web serverGFE · frontend
Step 1 / 41≈ 0 ms

Type google.com, press Enter

Each keystroke already ran autocomplete against your history and suggestions. Enter commits whatever is in the omnibox.

L7 · ApplicationStart / endBrowser

The flowchart

All 41 steps and 14 decisions, with every exit labelled: the answer that keeps the trip going, and 10 ways it can fail or retry. Tap a shape to read what it does, or play any outcome on the map.

Color = OSI layer

  • L7 Application
  • L6 Presentation · TLS
  • L4 Transport
  • L3 Network
  • L2 Data link
  • L1 Physical

Shape = kind of step

  • Start / end
  • Process
  • Decision
  • Message on the wire
  • Cache / lookup

Every exit, labelled

  • ✓Continues down the main line
  • ✗Fails
  • ↻Retries
  • »Skips ahead
  • ↺Starts over
01

Application

Turn what you typed into an address the network understands.

    • »Search termSkips ahead

      Send the text to the default search engine instead.

    ✓ URL
    • ↺Not listedStarts over

      Try http:// first, get a 301 to https://, and start the request again.

    ✓ Yes: HTTPS only
    • »Cached responseSkips ahead

      The worker answers from Cache Storage and the network is never touched.

    ✓ No match: use the network
    • »HitSkips ahead

      Use the cached IP and skip the whole DNS lookup.

    ✓ Miss
    • ✗NXDOMAINFails

      The name doesn't exist. The browser shows DNS_PROBE_FINISHED_NXDOMAIN and the trip ends.

    • ↻TimeoutRetries

      Retry after a second, then try the next configured resolver before giving up.

    ✓ NOERROR
02

Transport

Open a reliable, encrypted pipe to Google.

    • »YesSkips ahead

      Skip TCP and TLS entirely and send the request on the open HTTP/2 connection.

    ✓ No: first visit
    • »Yes (Alt-Svc)Skips ahead

      QUIC over UDP: transport and TLS 1.3 set up together in one round trip, with no TCP handshake.

    ✓ No: use TCP
    • ↻No replyRetries

      Resend the SYN after ~1 s, then 2 s, 4 s… and finally show ERR_CONNECTION_TIMED_OUT.

    • ✗RSTFails

      Nothing is listening on that port: ERR_CONNECTION_REFUSED.

    ✓ Yes
    • ✗Untrusted or expiredFails

      A full-page NET::ERR_CERT_* warning. No request is sent.

    • ✗No shared cipherFails

      The handshake aborts with ERR_SSL_VERSION_OR_CIPHER_MISMATCH.

    ✓ Valid chain and hostname
03

Network

Wrap the request layer by layer and get it out of the house.

    • »YesSkips ahead

      ARP for that host directly and deliver it on the local network.

    ✓ No: send to the gateway
    • »CachedSkips ahead

      Use the stored MAC address; no broadcast needed.

    ✓ Miss: broadcast
04

Internet

Cross 10–20 independent networks to reach Google.

    • ↻Lost on a busy hopRetries

      Duplicate ACKs (or a timeout) trigger a retransmit, and TCP halves its congestion window.

    • ✗TTL hit 0Fails

      A router drops it and sends back ICMP Time Exceeded. That's exactly what traceroute uses.

    ✓ ACKed
05

Server

Land on the nearest edge and the right machine behind it.

    • ↻Backend downRetries

      Health checks already pulled it from the hash ring; the next healthy one takes the connection.

    ✓ Healthy backend
    • ↺301 / 302Starts over

      Follow the Location header and start over from DNS for the new host (for example www.google.com).

    • »304Skips ahead

      Not Modified: reuse the cached copy, no body is sent.

    • ✗5xxFails

      Retry if the request is safe to repeat; otherwise show the server's error page.

    ✓ 200 OK
06

Return

Bring the bytes home and turn them into pixels.