Skip to content

Content Delivery Networks (CDN)

This article explains Content Delivery Networks (CDNs), why content is distributed across geographically distributed servers, how CDN caching and content delivery work, and how CDNs bring frequently requested content closer to users and devices.


1. Why Do We Need CDNs?

In the previous articles, we discussed:

▶ On-Device vs Edge vs Cloud Computing

▶ Multi-Access Edge Computing (MEC)

The common idea was to consider where computation should take place and how computing resources can be brought closer to the devices and users that need them.

In particular, MEC brings computing resources closer to devices by placing computing infrastructure within or near the mobile access network.

However, large-scale applications have another problem that is not primarily about computation.

A large application may need to deliver the same content to a very large number of users or devices.

For example, a video streaming service may need to deliver the same movie to thousands or millions of users located in different geographical locations. Similarly, a website may need to deliver the same images, JavaScript files, videos, or software downloads to users around the world.

If all users obtain this content directly from a single server, that server has to handle all of the requests.

For example:

Users
  │
  ├──────────┐
  ├──────────┤
  ├──────────┤
  ├──────────┤
  └──────────┘
       │
       ▼
  Main Server
       │
       ▼
     Content

As the number of users increases, the amount of content that must be delivered by the server also increases. A common solution is to place copies of the content on multiple servers distributed across different geographical locations.

User ──────► Nearby Server
User ──────► Nearby Server
User ──────► Nearby Server
User ──────► Nearby Server

These distributed servers can deliver the content from locations closer to the users or devices requesting it.

For example, a company may have users in Singapore, India, Europe, and the United States. Instead of requiring every user to obtain content from one central server, copies of the content can be stored at servers located in or near these regions.

    Central Server
    ┌─────┼─────┬─────┐
    ▼     ▼     ▼     ▼
  Asia  Europe  USA  Other
    │     │      │
    ▼     ▼      ▼
  Users Users  Users

This approach is the basic idea behind a Content Delivery Network (CDN).

A CDN is a distributed network of servers that stores and delivers content from locations closer to the users or devices requesting that content.

The content does not have to be generated separately at every server. Typically, the original content is maintained at an origin server, while copies of that content are distributed to servers closer to users.

The key idea is therefore different from MEC.

MEC brings computing resources closer to devices, while a CDN brings content closer to users or devices.

This distinction is important:

  • MEC is primarily concerned with bringing computing resources closer to devices so that computational tasks can be performed near where the data is generated.
  • CDN is primarily concerned with bringing content closer to users or devices so that frequently requested content can be delivered from a nearby location.

Therefore, a CDN is not limited to human users. Devices can also use a CDN to obtain content such as firmware updates, software packages, configuration files, maps, images, videos, or other frequently requested data.

In this sense, a CDN is another application of the broader edge concept, but instead of moving computation toward the edge, it moves content toward the edge.


2. How Does a CDN Work?

A CDN works by placing copies of content on multiple servers distributed across different geographical locations.

When a user requests content, the request is directed to an appropriate CDN server rather than always going directly to the origin server.

For example:

User
  │
  │ Request
  ▼
CDN
  │
  ▼
Nearby CDN Server
  │
  │ Content
  ▼
User

If the requested content is already available on the CDN server, the server can return it directly to the user.

User
  │
  │ Request
  ▼
CDN Server
  │
  │ Content Available
  ▼
User

The CDN server therefore acts as a nearby copy of the origin server for the content that it stores.

If the requested content is not available on that CDN server, the CDN can obtain the content from the origin server and then store a copy for subsequent requests.

User
  │
  │ Request
  ▼
CDN Server
  │
  │ Content Not Available
  ▼
Origin Server
  │
  │ Content
  ▼
CDN Server
  │
  │ Content
  ▼
User

The next user requesting the same content can then receive it from the CDN server without requiring another request to the origin server.

This process is called caching.

For example, suppose thousands of users in a particular region request the same video. The CDN can store a copy of that video at an edge server in that region. Subsequent users can obtain the video from that server.

First Request:

User ──► CDN Server ──► Origin Server
                │
                └── Store Copy


Subsequent Requests:

User ──► CDN Server
             │
             └── Cached Copy

The CDN therefore reduces the need for every user to obtain the same content directly from the origin server.

The basic operation can be summarized as:

The CDN delivers a cached copy when the content is available at the edge; otherwise, it obtains the content from the origin server and can cache it for future requests.


3. Practical Examples of CDNs

CDNs are widely used by large Internet services that need to deliver the same content to users in many different geographical locations.

Netflix

Video streaming is a classic example of CDN usage. A service such as Netflix needs to deliver large amounts of video content to users around the world.

Instead of requiring every user to retrieve video data from a central server, copies of frequently requested content can be distributed across geographically distributed delivery servers.

Netflix Origin
      │
      ├──────────► CDN Edge (Asia)
      │
      ├──────────► CDN Edge (Europe)
      │
      └──────────► CDN Edge (USA)
                     │
                     ▼
                   Users

Netflix operates its own content-delivery infrastructure, known as Open Connect, to distribute its video content closer to users.

The same basic CDN idea is used by many other large Internet services, particularly those that deliver large amounts of video and other media.

Websites and Web Applications

CDNs are also commonly used to deliver websites.

For example, a website may have its main application server in one location while images, CSS files, JavaScript files, and other static resources are cached on CDN servers around the world.

User
  │
  ▼
CDN Edge
  │
  ├── Images
  ├── CSS
  ├── JavaScript
  └── Other Content

This prevents every user from having to retrieve these files directly from the origin server.

Software Downloads

CDNs are also useful for distributing large software files.

For example, a company releasing a new application or operating-system update may need to serve the same large files to users around the world.

Instead of every user downloading the file from one origin server, CDN servers can distribute copies of the file.

Origin Server
      │
      ▼
┌─────┼─────┐
▼     ▼     ▼

CDN CDN CDN │ │ │ ▼ ▼ ▼ Users Users Users

This is particularly useful when a large number of users download the same file at approximately the same time.

Many large Internet platforms use CDNs or CDN services to distribute content globally. Examples include Netflix, Discord, and websites and applications using CDN providers such as Cloudflare, Akamai, and Amazon CloudFront. Cloudflare, for example, operates a globally distributed CDN that caches and delivers content from locations close to users.

The common pattern in all these examples is the same:

When many users need the same content, it is more efficient to distribute copies of that content across multiple locations rather than serving every request from a single origin server.


4. What Happens When Content is Not Available at the Edge?

A CDN edge server may not always have a copy of the content requested by a user.

For example, consider a user requesting a video that has not previously been requested from a particular CDN server.

User
  │
  │ Request
  ▼
CDN Edge Server
  │
  │ Content Not Available
  ▼
Origin Server

The CDN server then requests the content from the origin server.

The origin server sends the content back to the CDN server, which can then deliver it to the user.

User
  │
  │ Request
  ▼
CDN Edge Server
  │
  │ Request Content
  ▼
Origin Server
  │
  │ Content
  ▼
CDN Edge Server
  │
  │ Content
  ▼
User

The CDN server can also store a copy of the content after receiving it from the origin server.

This means that when another user requests the same content, the CDN server may already have a copy available.

First Request:

User ──► CDN Edge ──► Origin Server
                │
                └── Store Copy


Later Requests:

User ──► CDN Edge
             │
             └── Cached Copy

The first situation is commonly called a cache miss, because the requested content is not available in the CDN cache.

When the content is already available at the CDN edge, it is called a cache hit.

A cache hit means the requested content is available at the CDN edge. A cache miss means the CDN must obtain the content from the origin server.

This mechanism allows CDNs to serve frequently requested content from distributed edge servers while still using the origin server as the source of the original content.


5. Recent History Example: When the Edge Goes Down

CDNs improve the scalability and availability of Internet services by distributing content and traffic across a large number of edge servers. However, this also means that a failure in a major CDN provider can affect a very large number of websites and applications at the same time.

A good real-world example is the Cloudflare outage on November 18, 2025. Cloudflare reported that its network experienced significant failures in delivering core network traffic, causing many websites and applications using Cloudflare to become inaccessible. The incident was not caused by a cyberattack; it was triggered by a change to a database permission system that caused an unexpectedly large configuration file to propagate across Cloudflare's network. Core traffic was largely restored within a few hours.

This incident demonstrates an important property of large-scale distributed infrastructure:

Distributing services across the edge can improve scalability and performance, but dependence on a major shared infrastructure provider can also create a large common point of failure.

In other words, the edge can make the Internet faster and more scalable, but the infrastructure supporting the edge must itself be designed to tolerate failures.


6. Takeaway

A Content Delivery Network (CDN) is a distributed system that brings frequently requested content closer to the entities that need it.

The basic idea is simple: instead of requiring every request to obtain content from a single origin server, the CDN distributes copies of that content across multiple geographically distributed edge servers.

When a user or device requests content, the CDN attempts to serve it from a nearby edge server. If the content is available, the request is served directly from the cache. If it is not available, the CDN obtains it from the origin server and can store a copy for subsequent requests.

This is different from MEC, where the primary purpose is to provide computing resources close to devices through the mobile network infrastructure.

MEC brings computing closer to devices, while a CDN brings content closer to whoever needs that content.

Therefore, a CDN can also serve devices, not just human users. For example, IoT devices can download firmware updates, robots can retrieve software or configuration files, and connected devices can obtain other frequently requested data from a nearby CDN server.

The important distinction is therefore not user vs. device, but computation vs. content:

MEC
└── Brings computing resources closer to devices

CDN
└── Brings content closer to users or devices

Back to Edge Computing Series