System design concepts · Talking Over the Network

Networking Basics for System Design: DNS, TCP, HTTP, TLS

You don't need to be a network engineer. You do need to know where time goes between a tap on a phone and a byte back on the screen.

What you'll be able to explain
  • Narrate what happens when a user opens a URL
  • Choose between TCP, UDP and QUIC for a use case
  • Explain DNS caching, TTLs and geo-routing
  • Compare HTTP/1.1, HTTP/2 and HTTP/3
  • Count round trips and reduce them

The journey of one request

BrowserDNS resolverCDN edgeOrigin1where is shop.example.in?2203.0.113.10 (nearest edge)3TCP + TLS handshake4secure channel ready5GET /6cache miss: GET /7HTML (cacheable 60 s)8HTML9GET /app.js, /logo.png (parallel)10cached assets
Opening https://shop.example.in for the first time (no caches warm).

Every arrow costs at least half a round trip. On mobile networks in India, a round trip can be 50–150 ms, so the number of round trips often matters more than server speed. Most web performance work is really round-trip reduction: CDNs move the server closer, connection reuse skips handshakes, and HTTP/2+ sends many requests over one connection.

The layers that matter

ApplicationHTTP, gRPC, WebSocket, DNS: what your code speaksSecurityTLS: encryption + identity via certificatesTransportTCP (reliable, ordered) or UDP (fast, no guarantees); QUIC on UDPNetworkIP: addressing and routing packets between machinesLinkEthernet, Wi-Fi, 4G/5G: getting bits to the next hop
A simplified network stack. Designers mostly live in the top three layers.

TCP, UDP and QUIC

TCP UDP QUIC (HTTP/3)
Delivery Reliable, retransmits lost packets Best effort Reliable per stream
Ordering Strict, for the whole connection None Per stream, so one loss doesn't block others
Setup 1 RTT + TLS (1–2 RTT) 0 RTT 1 RTT including TLS, 0-RTT on resume
Typical use Web, APIs, databases DNS, video calls, games, telemetry Modern web, mobile apps
Network switch (Wi-Fi → 4G) Connection breaks N/A Survives (connection IDs)

Head-of-line blocking is the key concept: with TCP, if packet 5 is lost, packets 6–20 wait even if they belong to unrelated requests. QUIC fixes this by giving each stream its own ordering.

Analogy

TCP is a single-lane road: if one truck breaks down, everyone behind it waits. QUIC is a multi-lane road where each lane has its own traffic.

DNS: the internet's address book

DNS resolves names in a hierarchy: your device asks a recursive resolver (ISP, 1.1.1.1, 8.8.8.8), which asks the root, then the TLD servers (.in), then the domain's authoritative servers. Results are cached at every level for the record's TTL.

Things designers use DNS for:

  • Geo-routing: return the IP of the nearest region.
  • Weighted routing: send 5% of traffic to a new region.
  • Failover: health-checked records stop returning a dead region's IP.
Common trap

Thinking DNS failover is instant. Resolvers and devices cache records, sometimes ignoring short TTLs. Expect minutes, not seconds. For fast failover, use anycast IPs or a global load balancer that keeps one IP and reroutes behind it.