Network Essentials
How data moves between machines: the layers, TCP and UDP, TLS 1.3, QUIC and HTTP/3, where latency comes from, and the practical limits of ports, NAT, idle timeouts and packet sizes.
Overview
Every arrow in a system design diagram is a network connection, and each one has a cost. Before the first byte of a request reaches the server, a new HTTPS connection may already have spent two or three round trips on handshakes. And a round trip across an ocean takes tens of milliseconds however fast the link is, because light in glass has a speed limit.
This chapter covers the parts of the network that shape a design: what each layer does, how TCP delivers bytes reliably and why it holds back on purpose, when UDP is the better base, how TLS 1.3 and QUIC cut handshakes, and where latency really comes from. It ends with the small practical limits that cause real outages: ports, NAT, idle timeouts and packet sizes.
You do not need to memorize packet formats. You need to know what each piece costs in round trips and bytes, and what breaks when it is set up wrong. That is what interviewers listen for.
What you will be able to do
- Say which layer a problem lives at, and which box in the design (switch, router, load balancer, proxy) can see it.
- Count the round trips before a request's first byte, for TCP with TLS 1.2 or 1.3, and for QUIC with and without 0-RTT.
- Explain flow control, congestion control and head-of-line blocking, and how HTTP/2 and HTTP/3 differ.
- Estimate a request's latency from distance, bandwidth and round trips, and size a connection's window from the bandwidth-delay product.
- Recognize port exhaustion, NAT and load balancer idle timeouts, and MTU black holes, and fix them.
Key concepts
- Layers and encapsulation
- The TCP handshake
- Flow and congestion control
- Bandwidth-delay product
- UDP
- TLS 1.3 and 0-RTT
- QUIC and HTTP/3
- Head-of-line blocking
- The four kinds of delay
- Ports, NAT, keep-alive and MTU
Interview questions
- What happens at each layer when a browser sends an HTTPS request?
- Why does TCP need a three-way handshake, and what does it cost?
- What is the difference between flow control and congestion control?
- When would you use UDP instead of TCP?
- What is head-of-line blocking, and how do HTTP/2 and HTTP/3 deal with it?
- How does TLS 1.3 set up a connection in one round trip, and what is the risk with 0-RTT?
- Users in Europe say your API in the US is slow, even though the servers are idle. Where does the time go, and what would you change?
- What is the bandwidth-delay product, and why can one TCP connection fail to fill a fast, long link?
- A service that makes many short outbound HTTPS calls starts failing to connect under load, while CPU and memory look fine. What could be wrong?
- Connections in your pool fail with resets after quiet periods. Why, and how do you fix it?
Sign up free to read the full topic
More System Design topics
Start free on Cariara · Coding problems · System design studio