Explainer
How CDNs work: caching, edge servers and anycast
A content delivery network (CDN) is a geographically distributed group of servers that caches web content close to users, so pages load from a nearby data center instead of a distant origin server.[1][2] Its cache servers store requested content and serve the same copy to many users, following HTTP rules that mark each stored response as fresh or stale.[3][4] A CDN provider says most web traffic now passes through CDNs, so a failure can leave many sites showing error pages, as in Cloudflare's outage of November 18, 2025.[5][6]
This explainer covers how CDNs work in general. Some descriptions come from CDN providers’ own documentation and filings, and provider figures are self-reported. It does not compare or recommend providers.
What a CDN is
A content delivery network (CDN) is a geographically distributed group of servers that caches content such as HTML pages, JavaScript files, stylesheets, images and videos close to users.[1] The IETF describes a typical CDN as having a request routing system, a distribution system of cache servers (which it calls surrogates), a logging system and a control system.[7]
A CDN does not host a site’s content or replace its hosting; it caches content at the network edge, in front of the site’s own origin server.[8] In HTTP terms it is a managed shared cache, deployed by service operators to offload the origin server and deliver content efficiently.[9]
Caching at the edge
A surrogate, often simply called a cache, stores requested content so it can serve the same copy to many users without fetching it from the origin each time.[3] Users then connect to a geographically closer data center instead of wherever the origin server is.[2] Because most requests are answered from cache, the origin has to send much less data, which lowers hosting costs.[10]
CDNs place servers at internet exchange points (IXPs), the main places where different internet providers connect to exchange traffic.[11] Large providers run many such sites: Akamai, which has offered its services since 1998, reported more than 4,300 edge points of presence in over 130 countries and about 700 cities at the end of 2025.[12]
Getting users to the nearest server
With anycast, requests to a single IP address can be routed across multiple data centers, and traffic usually goes to the nearest data center with capacity to handle it; under ordinary unicast routing, by contrast, every node has its own unique address.[13]
Fresh, stale and private: HTTP cache rules
A stored response is either fresh or stale depending on its age; a Cache-Control header of max-age=604800, for example, keeps a response fresh for one week.[4] Some CDNs also support their own headers, such as Surrogate-Control, that apply only within that CDN.[14]
A response containing personalized content should be marked Cache-Control private so that only the user’s own browser stores it, because a shared cache could let other users retrieve it.[15]
Security, scale and single points of failure
Because they sit between users and the origin server, CDNs can provide security services such as DDoS mitigation, certificate management and web application firewalls.[16] For how those attacks work, see how DDoS attacks work.
CDNs now carry a large share of the web: Cloudflare, itself a CDN provider, says the majority of web traffic is served through CDNs.[5] On November 18, 2025 Cloudflare’s network failed to deliver core traffic from 11:20 UTC until it was largely restored by 14:30; users trying to reach its customers’ sites saw error pages, and the company said a database permissions change had caused a configuration file to double in size, and that no cyberattack was involved.[6]
For the bigger picture of addressing and routing, see how the internet works and how DNS works. For renting computing power rather than caching content, see how cloud computing works.
Read next
Internet and telecoms: a crash course
A sourced crash course on the internet, DNS, Wi-Fi, fibre, 5G and satellites, who governs them, and US rules on spectrum, net neutrality and robocalls.
Questions readers ask
What is a CDN?
A content delivery network is a geographically distributed group of servers that caches content such as HTML pages, JavaScript files, stylesheets, images and videos close to users. The IETF describes it as network infrastructure whose elements cooperate for more effective delivery of content.[1]
How does a CDN make websites faster?
Users connect to a geographically closer data center instead of the website's origin server, which cuts the distance data travels. Answering most requests from cache also reduces the data the origin must send.[2][10]
Is a CDN the same as web hosting?
No. A CDN does not host content or replace web hosting; it caches content at the network edge, in front of the origin server.[8]
How does a CDN know when to refresh its copy?
HTTP caching rules mark each stored response as fresh or stale based on its age. For example, a Cache-Control max-age=604800 header keeps a response fresh for one week. Some CDNs also support their own headers, such as Surrogate-Control.[4][14]
What is anycast?
A routing method in which requests to a single IP address can be routed across multiple data centers, usually to the nearest one with capacity. Under unicast, by contrast, every node has its own address.[13]
Do CDNs help with security?
They can offer DDoS mitigation, certificate management and web application firewalls, because they sit in front of the origin server.[16]
What happens when a CDN goes down?
Sites that rely on it can become unreachable. On November 18, 2025 Cloudflare's network failed to deliver core traffic from 11:20 UTC until it was largely restored by 14:30; Cloudflare said a database permissions change, not a cyberattack, caused it.[6]
Sources
· 16 claims from 4 publishers
Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.
- [1]
A content delivery network (CDN) is a geographically distributed group of servers that caches web content, such as HTML pages, scripts, stylesheets, images and video, close to users. confirmedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · What is a CDN? (retrieved 2026-11-14)
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · What is a CDN? (retrieved 2026-11-14)
- RFC 6707: Content Distribution Network Interconnection (CDNI) Problem Statement · IETF (RFC Editor) · Primary source · 2012-09-01 · Section 1.1, Terminology (retrieved 2026-11-14)
- [2]
A CDN cuts load times by letting users connect to a nearby data center instead of the website's origin server. confirmedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · Latency - How does a CDN improve website load times? (retrieved 2026-11-14)
- [3]
CDN surrogates, often called caches, store requested content so they can serve the same content to many users without fetching it again each time. confirmedas of 2012-09-01
- RFC 6707: Content Distribution Network Interconnection (CDNI) Problem Statement · IETF (RFC Editor) · Primary source · 2012-09-01 · Section 1.1, Terminology (retrieved 2026-11-14)
- RFC 6707: Content Distribution Network Interconnection (CDNI) Problem Statement · IETF (RFC Editor) · Primary source · 2012-09-01 · Section 1.1, Terminology (retrieved 2026-11-14)
- [4]
A cached HTTP response is either fresh or stale depending on its age; a header such as Cache-Control max-age=604800 keeps it fresh for one week. confirmedas of 2026-11-14
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Fresh and stale based on age (retrieved 2026-11-14)
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Fresh and stale based on age (example: Cache-Control: max-age=604800) (retrieved 2026-11-14)
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Fresh and stale based on age (retrieved 2026-11-14)
- [5]
Cloudflare, a CDN provider, says the majority of web traffic is now served through CDNs. reportedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · What is a CDN? (retrieved 2026-11-14)
- [6]
On November 18, 2025 Cloudflare's network failed to deliver core traffic from 11:20 UTC until it was largely restored by 14:30, and users trying to reach its customers' sites saw error pages; Cloudflare said a database permissions change had doubled a configuration file, not a cyberattack. confirmedas of 2025-11-18
- Cloudflare outage on November 18, 2025 · Cloudflare · Primary source · 2025-11-18 · Blog post (retrieved 2026-11-14)
- Cloudflare outage on November 18, 2025 · Cloudflare · Primary source · 2025-11-18 · Blog post (retrieved 2026-11-14)
- Cloudflare outage on November 18, 2025 · Cloudflare · Primary source · 2025-11-18 · Blog post (retrieved 2026-11-14)
- Cloudflare outage on November 18, 2025 · Cloudflare · Primary source · 2025-11-18 · Blog post (retrieved 2026-11-14)
- Cloudflare outage on November 18, 2025 · Cloudflare · Primary source · 2025-11-18 · Blog post (retrieved 2026-11-14)
- [7]
The IETF describes a typical CDN as having a request routing system, a distribution system of surrogate servers, a logging system and a control system. confirmedas of 2012-09-01
- RFC 6707: Content Distribution Network Interconnection (CDNI) Problem Statement · IETF (RFC Editor) · Primary source · 2012-09-01 · Section 1.1, Terminology (retrieved 2026-11-14)
- [8]
A CDN does not host a website's content or replace web hosting; it caches content at the network edge. confirmedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · What is a CDN? (retrieved 2026-11-14)
- [9]
In HTTP terms, a CDN is a managed shared cache that service operators deploy to offload the origin server and deliver content efficiently. confirmedas of 2026-11-14
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Types of caches, Managed caches (retrieved 2026-11-14)
- [10]
By answering most requests from its own caches, a CDN reduces how much data the origin server has to send, lowering hosting costs. confirmedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · In what ways can a CDN reduce bandwidth costs for a website owner? (retrieved 2026-11-14)
- [11]
CDNs place servers at internet exchange points (IXPs), the main places where different internet providers connect to exchange traffic. confirmedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · How does a CDN work? (retrieved 2026-11-14)
- [12]
Akamai, which has offered its services since 1998, reported more than 4,300 edge points of presence in over 130 countries and about 700 cities at the end of 2025. confirmedas of 2026-02-20
- Akamai Technologies annual report for 2025 (Form 10-K) · Akamai Technologies (SEC filing) · Primary source · 2026-02-20 · Item 1. Business (retrieved 2026-11-14)
- Akamai Technologies annual report for 2025 (Form 10-K) · Akamai Technologies (SEC filing) · Primary source · 2026-02-20 · Item 1. Business (retrieved 2026-11-14)
- [13]
With anycast routing, requests to a single IP address can be routed across multiple data centers, and traffic usually goes to the nearest data center with capacity, unlike unicast where every node has a unique address. confirmedas of 2026-11-14
- What is Anycast? How does Anycast work? · Cloudflare · Secondary source · How does Anycast work? (retrieved 2026-11-14)
- What is Anycast? How does Anycast work? · Cloudflare · Secondary source · What is Anycast? (retrieved 2026-11-14)
- What is Anycast? How does Anycast work? · Cloudflare · Secondary source · What is Anycast? (retrieved 2026-11-14)
- [14]
Some CDNs support their own caching headers, such as Surrogate-Control, that apply only within that CDN. confirmedas of 2026-11-14
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Managed caches (retrieved 2026-11-14)
- [15]
Personalized responses should be marked Cache-Control private so that only the user's own browser cache stores them, since shared caches could leak them to other users. confirmedas of 2026-11-14
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Private caches (retrieved 2026-11-14)
- HTTP caching · MDN Web Docs (Mozilla) · Secondary source · Private caches (retrieved 2026-11-14)
- [16]
Because they sit between users and the origin server, CDNs can offer security services such as DDoS mitigation, certificate management and web application firewalls. confirmedas of 2026-11-14
- What is a CDN? How do CDNs work? · Cloudflare · Secondary source · CDN benefits (retrieved 2026-11-14)
Revision history (1)
- Page created.
Created Nov 14, 2026. Last reviewed by an editor on Nov 14, 2026. Next scheduled review: May 14, 2027.
Cite this page
"How CDNs work: caching, edge servers and anycast." ContentLora, updated Nov 14, 2026. https://contentlora.com/explain/how-cdns-work
Spotted an error? Suggest a correction or emailcorrections@contentlora.com.