Free preview

What a CDN Is, and Its Requirements

Why this matters: "CDN" and "cache" get used interchangeably and are not the same thing. Getting the distinction right — and the six operations a CDN actually performs — is what turns a vague box on your diagram into a design.

Key takeaway

A content delivery network (CDN) is a distributed system of servers placed across geographic locations to improve the speed and reliability of content delivery. Rather than relying on a single origin, it uses a network of proxy servers closer to end users.

Edge servers

Those proxy servers operate at the network edge and are called edge servers. By caching content near users they:

  • Reduce latency
  • Conserve bandwidth
  • Protect the origin server from traffic spikes

CDNs minimize the physical distance data travels by storing copies of both static and dynamic content in local data centers. That proximity reduces propagation delay and ensures sufficient bandwidth along the delivery path.

The three problems addressed

ProblemHow the CDN addresses it
High latencyEdge servers shorten the physical distance between content and user, reducing network congestion and propagation delay
Data-intensive loadsThe origin sends data to the CDN once; the CDN then distributes it to many users, so the origin never sends a copy per user
Resource scarcityCDNs handle the majority of traffic for popular content, offloading origin servers and sharing load across distributed components

Does a CDN cache everything?

Not likely. A CDN caches a considerable portion of content based on its capabilities — mostly static content.

It also depends on volume. Netflix might store more than 90% of its movies in the CDN, whereas that is not feasible for a service like YouTube given the sheer size of its catalogue.

Functional requirements

Six operations:

OperationWhat it does
RetrieveFetch content from origin servers, depending on the CDN model
RequestProxy servers accept and respond to user requests for content
DeliverIn a push model, origin servers send content directly to CDN proxies
SearchEfficiently query the infrastructure to locate cached or stored content
UpdatePropagate content updates to peer proxy servers in a PoP — often via a replication script
DeleteRemove cached entries via TTL or purge requests, for static and dynamic content

Note that Retrieve and Deliver are the same content movement in opposite directions — pull versus push. That distinction becomes Lesson 4.

Non-functional requirements

RequirementTarget
PerformanceMinimize latency for the fastest possible response times
AvailabilityRemain operational during traffic spikes or attacks such as DDoS
ScalabilitySupport horizontal scaling to handle increasing user load
Reliability and securityEliminate single points of failure and protect hosted content from malicious attacks

Building blocks

The design reuses two components you have already built:

  • DNS — maps human-friendly domain names to the IP address of the appropriate proxy server.
  • Load balancers — distribute requests among operational proxy servers.

Both chapters already covered the mechanisms this design leans on: DNS-based traffic steering and anycast from the DNS chapter, and GSLB from the Load Balancers chapter. This chapter uses them rather than re-deriving them.

Key takeaway

A CDN is a distance solution, not a repetition solution. Six operations, four non-functional targets, and it stands on DNS for routing and load balancers for distribution within each location.

Interview signal by level

LevelWhat a strong answer sounds like
L4"A CDN caches static content near users."
L5Separates it from caching: "a cache fixes repeated work, a CDN fixes distance — and it also shields origin from spikes and DDoS."
Staff+Reasons about what's cacheable: "how much of the catalogue fits at the edge decides the strategy — Netflix can hold 90% of its library, YouTube can't, so one gets push and the other needs pull with long-tail handling."

Next: the components and the workflow between them.

Enjoying the preview?

Create a free account to unlock the rest of this course, the in-browser judge, and live AI mock interviews.

Sign up free to continue