Delivering Application Traffic
Delivering Traffic to Users 🌐
In the previous lesson you built a mental picture of the network your servers sit inside: a private address space, divided into subnets, with firewall rules deciding what may reach what. That explains what happens once a request arrives. It doesn't explain how a request from someone's phone in Sydney or Manchester finds your application at all. This lesson follows that journey from the moment a person types your website name to the moment the page appears on their screen, and it introduces the three pieces of machinery that make the journey work.
In this lesson, you will learn to:
- Explain DNS, load balancers, and CDNs in an application request path.
- Distinguish load balancing from autoscaling.
- Identify whether a performance symptom comes from name resolution, capacity or distribution, or delivery distance.
How a Request Finds Your Application 🧭
Start with what the user does: they type a name, something like your company's website address. Computers don't route traffic by name, they route by number. The domain name system, usually shortened to DNS, is the internet's directory service. Its one job is to translate a human-friendly name into a network address the browser can actually connect to. Think of it as the contacts list on your phone: you tap "Mum", the phone dials the number.
With an address in hand, the browser's request travels across the internet to the region where your application runs. It doesn't land on a particular server, though. It usually arrives at a load balancer, which sits in front of your servers and decides which one should handle this request. A load balancer does two useful things at once: it spreads requests across the servers you have, so no single machine takes the whole load, and it quietly checks whether each server is healthy, skipping any that have stopped responding. By routing new requests away from unhealthy servers, a load balancer can reduce the user impact of a server failure, provided healthy capacity remains.
Then the server does its work and sends a page back, along with everything the page needs: images, stylesheets, product photos, video. That last part is where the third piece comes in, the content delivery network or CDN, which we'll come to shortly.

In a troubleshooting discussion, Jessica asks Natalie to help separate the possible sources of a "slow site" report.
- Jessica: So when someone says the site is slow, which of those three is the culprit?
- Natalie: Depends where the delay is. If the name lookup is slow, the browser sits there before anything happens at all.
- Jessica: And if the load balancer is fine?
- Natalie: Then the request reaches a healthy server and the page gets built. But the images still have to travel back, and if the user is on the other side of the world, that trip takes real time no matter how fast our servers are.
- Jessica: So "slow" isn't one problem. It's a question of which leg of the journey.
That last line is the habit worth borrowing. Naming the leg of the journey turns a vague complaint into something you can actually fix.
Load Balancing Is Not Autoscaling ⚖️
These two get confused constantly, and the difference is genuinely simple once you see it. A load balancer distributes traffic across the servers that already exist. It does not create servers. If you have three servers and traffic doubles, the load balancer will faithfully spread twice the traffic across the same three machines, and all three will struggle.
Autoscaling is the other lever. It changes how many servers exist, adding machines when demand rises and removing them when demand falls. So when traffic triples every weekday at nine in the morning and drops again at six, that is an autoscaling situation: you need more capacity, not merely a fairer distribution of the capacity you have.
In practice the two work together. Autoscaling adds a fourth and fifth server; the load balancer notices them and starts sending traffic their way. Consequently, when someone proposes "just add more servers," the honest response is to ask what the problem actually is. More servers help when your existing servers are overloaded. They do nothing at all when the servers are comfortable and the delay is somewhere else entirely.
Shortening the Distance with a Content Delivery Network 📍
Distance costs time. Data travels quickly but not instantly, and a request that has to cross an ocean and come back may take hundreds of milliseconds before a single image arrives. If your application runs in a European region and your customers are in Australia, every image on every page makes that round trip. Adding servers doesn't help, because the servers were never the bottleneck. The distance was.
A content delivery network solves this by keeping copies of your images, files, and other unchanging content at edge locations, small sites the provider operates in cities around the world. This is called edge caching. When a nearby edge does not already have a cacheable file, it retrieves it from the configured origin, often in your application's region, and can retain it according to the caching rules for later nearby requests. Moreover, this takes load off your own servers, since they stop resending the same product photo thousands of times.
The honest trade-off is cost. Serving content out of a provider's network to users on the internet is billed as data transfer out, and a content delivery network adds its own charges on top. It is usually money well spent for image-heavy sites with distant users, but it is a budget line, not a free switch.
The takeaway to carry forward is that delivery is a path with distinct legs: name lookup, the journey to your region, distribution across servers, and the return trip carrying content. Different symptoms point to different legs, and the fix has to match the leg. Next you'll test that mapping in a quick matching exercise pairing each piece of machinery with the job it does, then a short question separating load balancing from autoscaling, before you take the whole path into a live conversation with a colleague who needs a truthful explanation she can repeat to her own team.
