Course map

Topic 030 / Core

What happens when you type a URL (ties Part 3 together)

Chapter 3.3 · Proxies and the Request Path

What and why

Every topic so far in Part 3 is one piece of a request's journey; none of them alone forces you to assemble the pieces into the one sequence every engineer should be able to narrate end to end. This topic is that narrative — parsing a URL, resolving its host, opening a secured connection, exchanging an HTTP request and response, and rendering the result — with every earlier topic named in its place. Builds on: → 29.

Diagram

URL parse → DNS (→26) → TCP handshake (→25) → TLS handshake (→27)
  → HTTP request (→28) → reverse proxy / gateway (→29, →41) → server
  → response → render / connection kept alive for reuse

How it works

  1. Parse the URL into scheme, host, port, path, and query.
  2. Resolve the host to an IP address via DNS (→ 26), using a cached answer if its TTL hasn't expired.
  3. Open a TCP connection to that address (→ 25): the three-way handshake.
  4. If the scheme is https, negotiate TLS (→ 27): certificate validation, session key.
  5. Send the HTTP request (→ 28) over the secured connection, in whichever version client and server negotiate.
  6. The request may pass through a reverse proxy, CDN, or API gateway before reaching the origin server (→ 29).
  7. The server processes the request and returns a response.
  8. The client renders or consumes the response; the underlying connection may be kept alive and reused for the next request to the same host, skipping steps 2–4 on repeat visits.

Practical example

(illustrative). The first request to a host pays for DNS, TCP, and TLS setup before a single byte of HTTP content arrives; a second request shortly after, to the same host, can reuse the cached DNS answer, the open TCP connection, and a resumed TLS session — skipping most of steps 2 through 4 entirely.

When to use it

  • Use when: debugging a slow or failing request — this narrative is the checklist for which stage to inspect, with real tools: dig for step 2, curl -v or a browser's network tab for steps 3–8.
  • Avoid when: instrumenting every stage for a quick diagnosis is overkill — time only the stage you actually suspect.
  • Failure scenarios, one per stage: a bad or stale DNS record (step 2); a refused or timed-out TCP connection (step 3); an expired or mismatched certificate (step 4); a 4xx or 5xx HTTP status (steps 5–7); a proxy or gateway routing to the wrong backend (step 6).

Practice

(process kind — fill the template; 30 min, no lab services). Write the "type a URL" narrative in one page using the eight steps above, naming every topic from Chapters 3.1–3.2 in its place. Then annotate where a CDN (→ 89), an API gateway (→ 41), and a load balancer (→ 92) would insert themselves, and what each adds to the path. Done when every stage in your narrative names a topic number and no stage is hand-waved.

Key takeaway

The full request path is DNS, then a transport handshake, then a security handshake, then the HTTP exchange itself, through whatever proxies sit in the way — and caching at every one of those layers is why a repeat request is so much faster than the first. Done when you can: narrate the path from memory and name which topic covers each stage. Used next in → 31 (Part 3 now turns from the network path to the APIs that ride on top of it).

References

None — this topic makes no external claims.

Source directory

Search the guide