A content delivery network (CDN) is a group of servers spread across many cities and networks that keeps copies of your web content and serves each user from a location near them. Instead of every request traveling to your own servers, often called the origin, the CDN answers from its cache and only goes back to the origin when it needs a fresh copy. The result is usually faster pages for distant users, less load and bandwidth on your own infrastructure, and more headroom for traffic spikes.
At a glance
- A CDN caches content such as images, scripts, video and downloads at many locations and serves users from a nearby one.
- Your origin servers keep the master copy; the CDN reduces how often they are hit.
- It works best for content many people request; personalized pages benefit less.
- Many CDN providers also sell security services, such as DDoS protection, web application firewalls and bot management, though what is included varies by plan.
- Pricing is usually based on data delivered, requests or a committed plan, and often differs by region.
What problem it solves
Distance adds delay. A user on another continent waits longer for every file from your servers than a user next door, and a page can need dozens of files. Popular content also puts load on your servers and network: a product launch, a viral post or a software update can send more traffic than the origin can handle, and serving large files or video directly can be expensive in bandwidth.
A CDN addresses all three. Cached content travels a shorter distance, the origin sees a fraction of the requests, and the CDN’s spread-out capacity absorbs surges that would overwhelm a single site. Because the CDN sits in front of your servers, it is also a natural place to filter attack traffic before it reaches you, which is why many providers bundle security features.
How it works
Routing users to a nearby location. When a user requests your site, the CDN directs them to one of its points of presence (PoPs), typically using DNS answers or anycast routing, where the same IP address is announced from many locations and internet routing usually delivers each user to a nearby one.
Caching. The PoP checks whether it has a fresh copy of the requested file. If it does, it serves it immediately. If not, it fetches the file from your origin, serves it and stores it for later requests. You control how long content stays cached through headers or CDN rules, and you can purge content when it changes. Some CDNs add tiered caching, where regional caches sit between the edge and your origin to cut origin traffic further.
Delivery optimizations. CDNs typically handle TLS encryption close to the user, support current protocols such as HTTP/2 and HTTP/3, compress files and, on some plans, resize or reformat images automatically. For video, they deliver streaming segments to large audiences.
Security and code at the edge. Many providers offer DDoS mitigation, a web application firewall, bot management and rate limiting on the same platform, and some let you run small programs at their PoPs to customize responses. These are separate products or plan features, not part of every CDN. Our Cloud Content Delivery Network solutions page covers the options, and our blog on CDN latency looks at how misconfiguration erodes the benefit.
When it matters for buyers
- When users are spread across regions or countries. The farther users are from your origin, the more a CDN helps.
- When you deliver large files or video. Offloading delivery can reduce origin bandwidth and improve playback.
- When traffic is unpredictable. Launches, campaigns and seasonal peaks are easier to absorb with cached content.
- When web security is on the agenda. Putting a CDN with security features in front of public sites and APIs is a common way to add DDoS and application protection, as long as the origin can’t be reached directly around it.
- When reviewing renewals. CDN pricing models differ a lot, and overage rates or unused commitments can make a contract more expensive than expected.
Questions to ask vendors
- Where are your PoPs, and how do you perform for our users’ regions and networks?
- How is pricing calculated (data, requests, regions, features), and what are overage rates?
- Which security features are included in our plan, and which are add-ons?
- How do you charge for traffic during a DDoS attack?
- How fast does a cache purge take effect across all locations?
- What logs and real-time analytics do we get, and do they cost extra?
- What is the availability SLA, and how is it measured?
- Can we lock our origin so it accepts traffic only from your network?
How it differs from edge computing
A CDN and edge computing both place infrastructure close to users, which is why they are often confused. A CDN’s job is delivery: it takes content that originates in your systems and serves copies of it from nearby caches. Edge computing is about running applications and processing data near where it is produced or used, whether in a factory, a store, a cell tower site or a provider’s regional facility. The line has blurred because many CDNs now let customers run code at their PoPs, but a CDN on its own does not process your operational data locally, and an edge computing deployment does not have to involve a CDN.
Problems this helps with
- Our website or app is slow for users far from our servers
- Traffic spikes that take our site down
- Bandwidth bills from serving large files and video
- Attack traffic hitting our web servers directly





