Deployment & infrastructure

CDN

AI-assisted editorial review:

A content delivery network (CDN) is a geographically distributed group of servers that keeps copies of content close to users, so files such as HTML pages, JavaScript, stylesheets, images, and video can be delivered from a nearby location.[1][2] A CDN does not replace the origin server that hosts the original files; it reduces how often requests have to travel back to it.[1]

What does CDN mean in simple terms?

Imagine a visitor in Seoul opening a page whose files live only on a server in the United States. Every request has to cross that distance. With a CDN, a copy cached at a nearby location can answer instead, which usually shortens the wait and takes load off the origin.[1][2] Cloudflare, Amazon CloudFront, and Vercel are well-known examples of services that operate CDNs.[1][3][4] Some providers now also run code and AI inference on the same distributed network.[6]

How can CDN be explained with an analogy?

A CDN works like a chain of neighborhood stores. Instead of driving to the head office (the origin server) for every item, you pick up the same product at the store around the corner (an edge server).

Where is CDN used?

Case 1

Netflix Open Connect — A purpose-built delivery network

Netflix delivers video through its own Open Connect program. It partners with more than a thousand internet service providers and offers qualifying providers Open Connect Appliances at no charge that sit inside their networks, alongside appliances in 60+ Netflix data centers.[5] Appliances are pre-filled with content suited to their location and updated nightly.[5] The idea is the same as any CDN: keep heavy traffic local instead of sending it over long, congested routes.

Case 2

Vercel — A CDN included with every deployment

Vercel states that its CDN is included automatically in every deployment. Its documentation lists 126 points of presence in 51 countries, with routing, caching, compression, and DDoS protection handled at that layer.[4] A small team can therefore get global caching without running its own servers. Actual load times still depend on page weight, cache settings, and where the visitors are.

Case 3

Amazon CloudFront — A cloud provider's CDN

AWS announced the public beta of Amazon CloudFront on November 18, 2008, describing it as a content delivery service integrated with its other cloud services.[3] For a practical comparison, check integration with the storage service you use, access controls, caching rules, and delivery costs.

Try it today

  1. Open your site in the browser developer tools and look at the response headers of an image or script. Cache-related headers often show whether a CDN served the file.[4]
  2. List which files on your site are the same for every visitor (images, scripts, styles) and which are personalized. Only the first group is a simple caching candidate.
  3. Check your provider's list of locations against where your visitors actually are.[4]
  4. Decide how you will update cached files when they change, for example by purging or by versioned file names.[4]
  5. Compare load times from a few regions before and after a change instead of relying on a single measurement.

Limits and direction

A CDN speeds up delivery, but it is not a web host. The origin still has to store and serve the original content.[1] Personalized pages, account data, and freshly generated responses usually cannot be reused for every visitor, so caching rules need care. Wrong settings can serve stale content or expose content that should have stayed private.

The role of CDNs has widened. Providers now run code and AI inference on their distributed networks: Cloudflare made Workers AI generally available on April 2, 2024, and reported GPUs in more than 150 cities at the time.[6] Vercel describes streaming AI responses and storing deterministic results in its runtime cache, which is distinct from its CDN response cache.[4] Being close to users helps, but it does not remove the need to choose what can safely be cached.

How has CDN evolved?

1999-04
Akamai commercial service
Akamai, incorporated in August 1998, launched its commercial content delivery service.[7]
2008-11-18
Amazon CloudFront beta
AWS announced a public beta of its content delivery service.[3]
2024-04-02
Workers AI generally available
Cloudflare made its AI inference platform on its global network generally available.[6]

Which concepts are related to CDN?

  • CDN provider
    CloudflareOperates a CDN and a developer platform on its global network.[1][6]
  • Built-in CDN
    VercelEvery Vercel deployment includes its CDN automatically.[4]

Which sources explain CDN?

  1. Cloudflare — What is a CDN? (Learning Center) — https://www.cloudflare.com/learning/cdn/what-is-a-cdn/
  2. MDN Web Docs — CDN (Glossary) — https://developer.mozilla.org/en-US/docs/Glossary/CDN
  3. AWS — Announcing Amazon CloudFront (2008-11-18) — https://aws.amazon.com/about-aws/whats-new/2008/11/18/whats-new-cloudfront/
  4. Vercel — Vercel CDN overview — https://vercel.com/docs/cdn
  5. Netflix — Open Connect — https://openconnect.netflix.com/en/
  6. Cloudflare — Leveling up Workers AI: general availability and more new capabilities (2024-04-02) — https://blog.cloudflare.com/workers-ai-ga-huggingface-loras-python-support/
  7. Akamai — Company history — https://www.akamai.com/company/company-history