5 exercises — load balancer, TCP vs UDP, DNS, HTTP status codes, CDN — the networking concepts that appear in every architecture discussion and incident review.
"The service is behind a load balancer — requests are distributed across three backend instances." What does a load balancer do?
A load balancer sits in front of a group of servers and routes each incoming request to one of them — using round-robin, least-connections, or IP hash algorithms. This improves availability (if one server fails, the others keep serving) and scalability (add more servers behind the balancer to handle more traffic). Common examples: AWS ALB/NLB, NGINX, HAProxy.
2 / 5
"We use TCP for the payment API and UDP for the live video stream." Why this choice?
TCP (Transmission Control Protocol) establishes a connection (3-way handshake), ensures packets arrive in order, retransmits lost packets, and controls congestion. Ideal for accuracy-critical traffic: APIs, file transfers, email. UDP (User Datagram Protocol) just fires packets — no connection, no acknowledgment, no retransmit. Ideal for latency-sensitive real-time data: video/audio streaming, gaming, DNS lookups, where a stale retransmit would be worse than a dropped frame.
3 / 5
"The browser can't resolve the hostname — it looks like the _____ server is not responding." Which service translates domain names to IP addresses?
DNS (Domain Name System) is the internet's phone book. When you type api.example.com, your OS queries a DNS resolver, which recursively looks up the authoritative name server for example.com and returns its IP address. Without DNS, you'd need to memorise IP addresses — DNS outages can take down services even when servers are healthy. Common tools: dig api.example.com, nslookup.
4 / 5
"The API returned a 429 status code." What does this mean and what should the client do?
429 Too Many Requests means the client hit the server's rate limit — too many requests in a given time window. The response often includes a Retry-After header indicating how long to wait. Best practice: implement exponential backoff with jitter — double the wait time on each retry, plus a small random offset to avoid a "thundering herd" when all clients retry simultaneously. Other key codes: 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error, 503 Service Unavailable.
5 / 5
"We're migrating traffic to the CDN edge — static assets will be served from a location close to the user." What does CDN stand for and how does it work?
A CDN (Content Delivery Network) stores copies of static assets (images, JS, CSS, video) at edge nodes around the world. When a user in Kyiv requests an image, they get it from the nearest edge node (say, Warsaw) rather than your origin server in Virginia — dramatically reducing latency. CDNs also absorb traffic spikes, protect against DDoS, and improve cache hit rates. Popular CDNs: Cloudflare, AWS CloudFront, Fastly, Akamai.