What Happens When You Press Enter
Between pressing Enter on https://engineer-atlas.dev and seeing a page, a name becomes an address, an address becomes a path, a path carries a connection, the connection is secured, and only then does HTTP say a word — and each step has its own way of failing.
The problem
engineer-atlas.dev. The network only moves packets between numeric addresses over physical links, with no guarantee any packet arrives. How does the browser turn a name into a rendered page, and why does it take so many steps?The whole ladder, once
Everything in the Networking domain is a zoom into one of these rungs. Read them once as a story: the browser has a URL; the URL names a host; the host has to become an IP address; the IP address has to be reachable through a chain of routers; once reachable, the two machines need a transport that turns unreliable packets into a reliable stream; the stream has to be encrypted and authenticated; and only then can HTTP ask for / and get bytes back that the browser turns into pixels.
Each rung is a separate mechanism with a separate failure. "The site is down" is never one thing: it is DNS returning nothing, or a route that black-holes, or a SYN with no SYN-ACK, or a certificate that expired at midnight, or a 502 from a proxy whose upstream died. The rest of the domain exists so that you can tell those apart in under a minute.
- Enter URLthe browser receives `https://engineer-atlas.dev`↓
- Parse URLscheme `https`, host `engineer-atlas.dev`, port 443 implied, path `/`↓
- DNS lookupname → IP address(es), via caches and resolvers↓
- Choose destination IPIPv6 or IPv4? which of several answers? (Happy Eyeballs)↓
- Routingeach router picks a next hop by longest-prefix match↓
- Establish transportTCP three-way handshake, or QUIC over UDP↓
- TLSkey agreement + certificate check; the name is verified here↓
- HTTP request`GET / HTTP/2` with headers, inside the encrypted stream↓
- Servera process behind a load balancer or proxy accepts, reads, computes↓
- HTTP responsestatus, headers, body — streamed back over the same connection↓
- Browserparse HTML, fetch sub-resources (repeat the ladder), render
From a string to an address
Enter URL / parse URL. The browser splits https://engineer-atlas.dev into a scheme (https, which fixes the default port 443 and the requirement for TLS), a host (engineer-atlas.dev), and a path (/, since none was given). Before touching the network it checks its own caches: an HSTS list that may force HTTPS, a cached HTTP response that may still be fresh, an existing open connection to the same origin that can be reused. Failures here are silent and cheap: a typo becomes a search, a stale cache becomes an old page.
DNS lookup. The host name is not an address. The browser asks the OS resolver, which asks a recursive resolver (your ISP’s, or 1.1.1.1, or a corporate one), which walks root → .dev TLD → the authoritative server for engineer-atlas.dev and returns A (IPv4) and AAAA (IPv6) records with a TTL. Most of the time the answer comes from a cache in a fraction of a millisecond; a cold lookup across the hierarchy costs tens of milliseconds. It fails as NXDOMAIN (the name does not exist), SERVFAIL (the resolver could not get an answer), a timeout (UDP port 53 blocked, resolver down), or, most insidiously, a stale cached answer pointing at a server that moved yesterday. See DNS: Why Names Need a Distributed Database and DNS Failure Modes: What Each One Looks Like.
Choose destination IP. DNS may return several addresses of two families. The browser races them: try IPv6 first, and if no connection is established within ~250 ms start IPv4 in parallel (Happy Eyeballs, RFC 8305). Whichever connects first wins. A broken IPv6 path on your network is why some sites feel "slow to start" by exactly a quarter of a second.
From an address to a path
Routing. Your machine does not know where engineer-atlas.dev’s server is. It knows one thing: whether the destination is on its own subnet (then deliver directly) or not (then hand the packet to the default gateway). The gateway does the same with a bigger table, and so on through your ISP, across an exchange point, into the hosting provider’s network. Every router independently looks up the destination prefix and forwards to a next hop — nobody holds the whole path. A packet across a continent crosses 10–20 routers in ~30–80 ms; across an ocean ~150 ms.
Routing fails by black-holing (a router has no route and drops silently, or a firewall drops without a reply), by loops (a misconfiguration that the TTL eventually catches), and by asymmetry (outbound and return paths differ, which is normal but confuses debugging). The symptom is almost always a timeout, never an error — see Why Can’t I Connect? and traceroute: Discovering the Path Hop by Hop.
From a path to a conversation
Establish transport. IP delivers packets, not conversations: they can be lost, reordered, duplicated. TCP builds a reliable, ordered byte stream on top with a three-way handshake (SYN → SYN-ACK → ACK, one round trip), sequence numbers and retransmission. HTTP/3 instead uses QUIC over UDP, which folds the transport and TLS handshakes into one round trip. Failure: SYN sent, nothing returned → connection timed out (a firewall, a dead host, a wrong route). SYN sent, RST returned → connection refused (the host is up but nothing listens on 443).
TLS. The stream is plaintext and unauthenticated; anyone on the path (the coffee-shop access point, your ISP) could read or alter it. TLS 1.3 performs a key agreement in one round trip and the server presents a certificate chaining to a root your browser trusts; the browser checks the name on it matches engineer-atlas.dev. Failures are loud and specific: NET::ERR_CERT_DATE_INVALID (expired), ERR_CERT_COMMON_NAME_INVALID (wrong name), a handshake alert on a protocol mismatch. See Why TLS Exists and Certificates and the Chain of Trust.
HTTP request. Only now does the browser send GET / with Host, Accept, User-Agent, cookies and a few dozen other headers — a few hundred bytes after roughly 2–3 round trips of setup. On HTTP/2 this is one stream on a multiplexed connection; on HTTP/1.1 it is the one request the connection can carry at a time.
The server, and the way back
Server. The packet arrives at an address that is very likely not the application at all but a load balancer or reverse proxy, which terminates TLS, picks a healthy backend, and opens (or reuses) a second connection to it. The backend process is blocked in accept() or epoll_wait(); the kernel wakes it, it reads the request, runs your code, perhaps queries a database, and writes a response. Failures here have their own vocabulary: 502 (the proxy could not reach the backend), 503 (overloaded or in maintenance), 504 (the backend took too long), 500 (your code threw).
HTTP response and browser. 200 OK, headers, then the body, flowing back through the same connection and the same routers in reverse. The browser starts parsing HTML before the body has finished arriving, discovers stylesheets, scripts and images, and runs the ladder again for each — usually on the same connection, sometimes to new hosts (a CDN), which means new DNS, new TCP, new TLS. A page that "loads slowly" with an idle server is usually dozens of these round trips, not compute; see Where the Time Goes: The Request Timeline.
- Round trips are the currency: DNS (0–1), TCP (1), TLS 1.3 (1), request/response (1). At 150 ms RTT that is ~600 ms before the first byte of HTML, before any server work.
- Every rung is cached to avoid repeating it: DNS caches, connection reuse, session resumption, HTTP caches, CDNs.
Key points
- A URL names a host; the network moves packets between addresses. DNS bridges the gap, and it is the first thing that can fail.
- No router knows the whole path. Each one does a longest-prefix lookup and forwards; the path emerges hop by hop.
- IP is best-effort. TCP (or QUIC) turns packets into a reliable stream; TLS turns the stream into a private, authenticated one; HTTP is the last layer, not the first.
- Each rung fails differently: NXDOMAIN, timeout, connection refused, certificate error, 502/504. Learn which symptom belongs to which rung.
- Round trips, not bandwidth, dominate the time to first byte. Caching at every layer exists to avoid repeating rungs.
- What you connect to is usually a load balancer or proxy, not the application process.
Why does this exist?
Mechanisms are answers to constraints. Open each question before reading the answer.
▸Why not just address servers by name and skip DNS?
Routers forward on fixed-length numeric prefixes that aggregate; names are variable-length, hierarchical in the wrong direction, and owned by different people than the networks that carry them. DNS decouples "what is it called" from "where is it right now", which is what lets a site move hosts without every client changing.
▸Why so many round trips before the first byte?
Each layer solves one problem and refuses to trust the layer below: DNS finds the address, TCP establishes reliability, TLS establishes identity and secrecy. QUIC and TLS 1.3 exist precisely to fold these into fewer trips.
▸Why does "the site is down" need a whole domain to debug?
Because the same user-visible symptom — a spinner — is produced by at least six mechanically different faults in six different systems owned by different people, and the fix for each is different.
Press Enter
- ↓
- ↓
- ↓
- ↓
- ↓
- ↓
- ↓
- ↓
- ↓
- ↓
How it fails
What the failure looks like from inside real software.
- Stale DNS: the site moved, your resolver still caches the old address; some users see the old server for up to the TTL.
- Connection timed out: SYN sent, nothing returns — a firewall dropping silently, a dead route, or a host that is off. Distinguish it from "connection refused" (a
RSTcame back, so the host is reachable). - Certificate error the morning after: the certificate expired at 00:00 UTC; every client fails at once while the server itself is perfectly healthy.
502 Bad Gateway: the proxy answered, the application behind it did not. The network and TLS were fine.- IPv6 half-broken: AAAA records exist, the IPv6 path is dead; Happy Eyeballs recovers after ~250 ms, so the site is "slow" rather than "down".
- A fast server and a slow page: 30 sub-resources on 5 hosts, each paying DNS + TCP + TLS on a 150 ms RTT.
Follow it through every layer
This lesson is one node of a longer journey. Zoom out, then zoom back in.