Building Software

Engineering Fundamentals for the Agent Era

Contents Section 3, The Machine

Networks and Protocols

Mistakes to catch in review

  1. A state-changing action exposed as a GET request, which link prefetchers and crawlers will trigger.

  2. Outbound network calls with no timeout, so a slow dependency holds connections open until the service runs out of them.

  3. A chatty client that makes dozens of sequential round trips where one batched request would do.

  4. Certificate verification disabled to make a TLS error go away.

How machines exchange data, from packets and routing up through DNS, TCP, TLS and HTTP.

Topics

Packets, IP and Routing
How data is split into packets, addressed and routed across networks.
TCP and UDP
Reliable ordered streams versus lightweight datagrams, the cost of setting up connections, and head-of-line blocking.
DNS
How names become addresses, how caching and TTLs work, and why DNS changes take time to spread.
TLS
What transport encryption guarantees about confidentiality and server identity, and what it leaves uncovered.
HTTP Semantics
Methods, status codes, headers and caching, and which methods are safe to repeat.
Latency and Bandwidth
Why round trips dominate response time, and how batching, connection reuse and proximity reduce them.

You understand it when you can

  • Explain step by step what happens when you load a URL, from the DNS lookup to the rendered response.
  • Explain each status code and caching header in a request and response captured in browser developer tools.
  • Estimate how long a page that makes twenty sequential requests takes over a 100 ms round trip, and explain how to cut that time.

Drill

An agent built an unsubscribe link as a GET request to /unsubscribe?user=ID and calls a third-party email API with no timeout. Find how users get unsubscribed without ever clicking, and what happens to your web servers when the email API stops responding.

Start here

Watch

1.1 Introduction (reposted) - What is the Internet

Jim Kurose, 2022. 14-minute lecture.

The first lecture of the textbook's author, describing the Internet as hosts, links, packet switches and protocols, and framing the layered stack from DNS and HTTP down to IP.

Watch

TLS Handshake Explained - Computerphile

Mike Pound, 2020. 17-minute explainer.

Walks through the TLS 1.3 handshake, key exchange and certificate check, showing what is lost when certificate verification is disabled.

Read

Computer Networking: A Top-Down Approach

James F. Kurose and Keith W. Ross, 2025, 9th edition.

The standard textbook, starting from HTTP and DNS and working down through TCP congestion control, IP routing and link layers.

High Performance Browser Networking

Ilya Grigorik, 2013. Free to read online.

Quantifies how round trips from TCP setup, slow start and the TLS handshake dominate response time, and how connection reuse and batching cut them.

Bulletproof TLS and PKI: Understanding and Deploying SSL/TLS and PKI to Secure Servers and Web Applications

Ivan Ristić, 2022, 2nd edition.

Explains what TLS guarantees, how certificate validation and PKI work, and the real attacks that succeed when verification is skipped or misconfigured.

Primary sources