Highlights

Contents

Part XII
12

The complete browser request

A typed URL combines naming, local forwarding, Internet routing, secure transport and application behavior in one observable exchange. Without reconciling their state, an explanation can jump from a hostname to a response while missing the return path. We will follow Finch’s cold request, count the byte budgets, and diagnose failures by the last boundary that succeeded.

CHAPTER ATLAS / FOLLOW THE READING PATHCHAPTER ATLAS / FOLLOW THE READING PATH1Network models andphysical signals2Data link and Ethernetswitching3VLANs and IP addressing4IP forwarding and routing5Transport and TCP6Flow and congestioncontrol7DNS and HTTP8QUIC, TLS and websessions9Proxies, tunnels andfirewalls10Socket programming andI/O11CDN, P2P and cloudnetworking12The complete browserrequest

#Section 53URL parsing, cache lookup and destination selection

A URL identifies scheme, authority, and resource components. For https://example.com, HTTPS supplies the default port; a fragment belongs to the browser rather than the HTTP target.

The browser may satisfy the request from a permitted representation cache. Otherwise it needs a destination address, using a valid name cache or its resolver. In our illustrative fresh DNS lookup the authoritative A result is 203.0.113.20. The browser may consider several addresses, including IPv6 answers, but the fixed running trace chooses this IPv4 destination. A certificate will later authenticate example.com, not simply that IP literal.

A REUSABLE BROWSER COPY CAN END THE REQUEST BEFORE TRANSPORTA REUSABLE BROWSER COPY CAN END THE REQUEST BEFORE TRANSPORTFinchURL keystored bytesusable hitnetworkoriginmissrequest transport is needed only after local reuse fails
Figure 2.58A usable local representation can finish the request before transport begins. A miss proceeds to the network and origin; freshness and policy decide whether local reuse is allowed.

The DNS record’s 300 second illustrative TTL has 180 seconds remaining after 120 seconds. That result means the address can still be reused under the teaching assumption. It says nothing about whether the HTTP body is fresh or the server is healthy. DNS cache, HTTP cache and connection pool are separate stores with separate validity checks.

The kernel matches 203.0.113.20 against Finch’s route table. It lies outside 192.168.10.64/26, so the route chooses gateway 192.168.10.65. ARP resolves that local gateway’s MAC if the neighbour cache lacks it. Finch does not broadcast ARP for the remote server across the Internet. A switch forwards the resulting frame according to the gateway MAC, while the carried IP destination remains the server.

Before drawing another arrow, identify the chosen destination address, interface, next hop and cache state. A correct answer can then describe how a cached DNS result, cached representation or existing connection removes specific work. Saying the browser always performs every lookup and handshake would misdescribe ordinary reuse.

#Section 54Ethernet, NAT and the routed return path

The frame names the local gateway while the packet names the remote server. The gateway checks route and policy, decrements TTL, and creates a new next-hop frame.

The illustrative NAT rule translates source 192.168.10.70:51000 into 198.51.100.7:40001. The server destination remains 203.0.113.20:443. The gateway records enough mapping and protocol state to restore a matching return flow. Relevant checksums must match the changed headers. IP routing beyond the gateway follows the server destination, while each router creates link addressing for its own next hop.

THE SAME FLOW HAS FOUR ADDRESS PAIRS; THE GATEWAY HOLDS THE KEY TO THE LAST ONETHE SAME FLOW HAS FOUR ADDRESS PAIRS; THE GATEWAY HOLDS THE KEY TO THE LAST ONE192.168.10.70gateway NAT203.0.113.20client outsrc 192.168.10.70:51000dst 203.0.113.20:443after NATsrc 198.51.100.7:40001dst 203.0.113.20:443server replysrc 203.0.113.20:443dst 198.51.100.7:40001restoredsrc 203.0.113.20:443dst 192.168.10.70:51000
Figure 2.59The IP destination survives the outbound NAT, while the private source becomes a public tuple. Orange marks the gateway mapping used to restore Finch’s return destination.

The server’s reply has source 203.0.113.20:443 and destination 198.51.100.7:40001. Routers follow the public destination toward the gateway, which finds its mapping and restores 192.168.10.70:51000. The gateway then needs Finch’s local link address and an allowed return policy. A route to the remote service alone cannot establish that full path.

Finch’s assumed 1,500 byte IP packet becomes a 1,518 byte Ethernet frame excluding physical preamble and inter-frame timing. A VLAN tag changes this frame-format count to 1,522. Routing replaces the frame, while an overlay or tunnel adds a further budget. Do not subtract Ethernet overhead from the IP MTU twice.

Path asymmetry is permitted by IP. The reply need not use the exact reverse router sequence, but it must reach the NAT state responsible for the private endpoint. A failover gateway lacking that state can interrupt established flows. This is why gateway redundancy, route redundancy and state replication are related but separate design tasks.

#Section 55TCP, TLS, HTTP and reconciled costs

TCP establishes ordered bytes, TLS verifies the hostname, and HTTP supplies the request. TCP counts encrypted record bytes where applicable, so its payload is not automatically application-body size.

The simplified cold timing model assigns one 40 ms RTT to TCP establishment, one to a fresh TLS exchange and one to the HTTP request and first response. The sum is 120 ms. It excludes DNS, application computation, serialization and any additional response data. We cannot add the separately illustrative 5.67 ms one-link delay to every RTT without knowing what path that RTT already includes.

tcold=tTCP+tTLS+tHTTP=40+40+40=120 ms.t_{\text{cold}}=t_{\text{TCP}}+t_{\text{TLS}}+t_{\text{HTTP}}=40+40+40=120\ \text{ms}.

Read this as cold first-response time equals the sequential transport, authentication and request-response delays under the stated assumptions. Reused connections remove setup dependencies. QUIC integrates transport and cryptographic establishment, changing this sequence rather than performing the identical TCP calculation on UDP.

ILLUSTRATIVE COLD EXCHANGE HAS THREE SEQUENTIAL RTT COSTSTCP40 msTLS40 msHTTP request40 ms40 + 40 + 40 = 120 msExcludes DNS, computation and separately counted serialization.
Figure 2.60The illustrative cold trace counts each sequential RTT once. Orange marks the setup work that a valid reused connection can avoid.
Boundary Count or state Contribution
Ethernet 1,518 frame bytes One local link wrapper
IPv4 1,500 packet bytes Routed endpoint addressing
TCP 1,460 payload bytes Ordered transport byte budget
NAT Private to public tuple Restorable return destination
TLS Verified host and keys Authenticated encrypted exchange
HTTP Method, headers and body Resource operation and result
Window 64,000 bytes 12.8 Mb/s RTT-bound ceiling
Full-path BDP 500,000 bytes Data occupying a 40 ms path

TLS records and HTTP headers consume some TCP payload, so this table does not claim an exact encrypted body size. It reconciles layers by naming each boundary’s unit. Application service time and receiver reading can add independent bottlenecks even when the transport path meets its calculated rate.

#Section 56Layered diagnosis and the complete interview trace

A proxy’s 504 shows enough routing, transport, and protocol processing succeeded to produce an HTTP response. Inspect the upstream deadline instead of assuming DNS failed.

Work outward from a named observation. No usable interface suggests local configuration. A valid address without a route suggests route selection. An unresolved gateway neighbour suggests local link or ARP trouble. SYN retransmissions suggest a transport path, listener or policy problem. A TLS hostname failure suggests identity. A parsed HTTP error suggests an application-aware component. These are diagnostic categories, not mutually exclusive guarantees.

DEBUG FROM THE BOTTOM: THE LAST LAYER THAT WORKED TELLS YOU WHERE TO LOOK NEXTDEBUG FROM THE BOTTOM: THE LAST LAYER THAT WORKED TELLS YOU WHERE TO LOOK NEXTlink + ARPgateway MAC known?no MAC: check cable, VLAN, ARProute + TCPSYN answered?retries: path, firewall, listenerTLScertificate matches name?mismatch: wrong host or proxyHTTP504status from origin?504: proxy reached, upstream slow
Figure 2.61Each observed success narrows the next question. Orange marks the first failing boundary rather than blaming every layer at once.

At the whiteboard, follow the exact packet. The browser selects 203.0.113.20, the route table sends the off-subnet destination to 192.168.10.65, ARP supplies the gateway MAC, the switch forwards that frame, and NAT exposes 198.51.100.7. Routes move the packet toward the server, TCP tracks bytes, TLS verifies the hostname, HTTP requests the resource, and the reverse tuple restores the response to Finch. A proxy, cache or cloud boundary can add another explicitly named exchange.

ONE URL ACROSS THE WORLD: 192.168.10.70 TO 203.0.113.20 AND BACKONE URL ACROSS THE WORLD: 192.168.10.70 TO 203.0.113.20 AND BACKFinchserver1caches, then DNS for example.com2route to gateway, ARP, Ethernet3NAT to a public source, IP hops4TCP or QUIC, TLS, HTTP request5response to the public mapping6gateway restores the private address
Figure 2.62The complete URL trace keeps one client, gateway, public translation and server in view. Orange marks the initial client work that selects the path before a response can exist.

Do not memorize the diagram as one mandatory packet schedule. Cached answers skip DNS work, cache hits can skip network delivery, reused connections skip establishment, and HTTP/3 replaces TCP with QUIC. The invariant is that every performed step has an owner, an input, a state transition and a failure condition.

This chapter leaves detailed routing policy engineering, radio design, cryptographic proofs and production packet-capture interpretation for deeper guides. It gives the foundation needed to ask those questions precisely. A strong interview answer names the branch assumptions first, then carries the same endpoints and byte units through every layer without unexplained jumps.