Networking Concepts Every Software Engineer Should Know for System Design
A software engineer needs a working model of about eight networking ideas, not a networking degree. The eight are DNS, TCP versus UDP, the three versions of HTTP, TLS, load balancers, CDNs, WebSockets with long polling, and gRPC. Each one explains a standard system design question. Learning the eight is therefore the same job as preparing for the round.
If you searched for the tools a network team uses, such as routers and firewalls, that question is answered in Which software is used for networking?.
DNS: how a name becomes an address
DNS, the Domain Name System, turns a name such as example.com into an IP address. An IP address is the number that identifies one machine on the internet. The browser asks a resolver, which asks the root, top-level, and authoritative name servers in turn. Each answer is cached for a time-to-live (TTL) measured in seconds. A TTL of 60 seconds lets you move traffic quickly; 24 hours reduces lookups.
Question it answers: what happens when you type a URL into a browser?
TCP versus UDP: reliability against latency
TCP and UDP are the two transport protocols, meaning the rules for moving packets between two machines. TCP numbers every packet, retransmits any that are lost, and delivers them in order. The cost is a three-way handshake before the first byte and a delay after every loss. UDP has no ordering, no retransmission, and no handshake, so a lost packet is simply gone.
Question it answers: why does a video call or a multiplayer game use UDP? A frame that arrives 200 ms late is worth less than the next frame, so waiting for a retransmit is the wrong trade.
HTTP/1.1, HTTP/2, and HTTP/3
HTTP is the request and response protocol that browsers and APIs use on top of TCP. HTTP/1.1 handles one request at a time per connection, so browsers open about six connections per host. HTTP/2 multiplexes, meaning it sends many requests over one connection at the same time. However, one lost TCP packet still blocks every stream behind it, which is called head-of-line blocking. HTTP/3 fixes that by running over QUIC, a protocol built on UDP in which each stream recovers its own losses.
Question it answers: why is a page slow when it makes 50 small API calls, and what does HTTP/2 change?
TLS: the handshake and where to end it
TLS, Transport Layer Security, is the encryption layer that turns HTTP into HTTPS. Before any data moves, client and server exchange certificates and keys in a handshake. That handshake costs one extra round trip in TLS 1.3 and two in TLS 1.2, plus CPU time on the server. Most systems therefore terminate TLS at the load balancer. It decrypts once, and traffic inside the private network travels as plain HTTP or is re-encrypted where policy requires it.
Question it answers: where do you terminate TLS, and why?
Load balancers at layer 4 and layer 7
A load balancer receives every incoming connection and spreads the requests across a pool of servers. A layer 4 balancer works at the transport layer: it sees only IP addresses and ports and forwards packets without reading them, which makes it fast. A layer 7 balancer works at the application layer and reads the HTTP request. It can therefore route by path, header, or cookie, terminate TLS, and retry a failed request elsewhere.
Question it answers: how do you route /api and /images to different services?
CDNs: caching at the edge
A content delivery network (CDN) is a set of servers in many cities that keep copies of your static files close to users. A request from Sydney for an image stored in Virginia costs about 200 ms of round trip time. The same request served from a Sydney edge server costs about 10 ms. You set how long each file is cached and invalidate it when it changes. A fuller explanation is in What is Content Delivery Network (CDN)?.
Question it answers: how would you serve images and video to users on every continent?
WebSockets and long polling: real-time delivery
HTTP only lets the client ask, so a server with new data cannot send it uninvited. Long polling is the workaround. The client sends a request, the server holds it open until data exists or about 30 seconds pass, and the client asks again at once. A WebSocket is a single TCP connection, opened through an HTTP upgrade, on which either side can send at any time. What is HTTP Long Polling? compares the two in more depth.
Question it answers: how does a chat app push updates to the browser?
gRPC: binary contracts between services
gRPC is a remote procedure call framework: a client calls a function that runs on another server as if it were local. The request and response types are declared in a Protocol Buffers file. The data travels as compact binary over HTTP/2, so a call is smaller and faster to parse than the same call as JSON. Browsers cannot call it directly, so gRPC is used between backend services and REST at the public edge. The trade-offs are covered in What is gRPC and how is it different from REST?.
Question it answers: how should 40 microservices talk to each other?
What you do not need
Subnetting is dividing an IP range into smaller blocks. Routing protocols such as BGP and OSPF decide the path packets take between networks. Both belong to network engineers, and a system design interviewer will not ask you to compute a subnet mask. Being able to explain a load balancer, a cache, and a proxy against a reverse proxy is enough.
How to Prepare
- Learn the eight in order. DNS and TCP first, then HTTP and TLS, then the four that depend on them.
- Attach each concept to its question. Practice the "type a URL" answer out loud until it names DNS, TCP, TLS, the load balancer, and the CDN without notes.
- Put a number on each one. Know the round trip cost of a handshake, a typical CDN hit time, and a sensible TTL.
- Study the fundamentals course. Grokking System Design Fundamentals covers each of these concepts as its own lesson with diagrams.
- Then move to full questions. Grokking the System Design Interview applies them to complete designs such as a URL shortener and a video service.

GET YOUR FREE
Coding Questions Catalog

$99

$197

$72