CDN (Content Delivery Network) (CDN)

Architecture

A distributed network of servers that caches and delivers content from locations close to end users. Reduces latency, offloads origin servers, and improves availability by serving content from the nearest edge.

Updated Mar 9, 2026

Full Explanation

A CDN puts copies of your content on servers around the world so users don't have to fetch everything from your single origin. User in Singapore? Served from Singapore. User in Frankfurt? Served from Frankfurt. Your origin in Virginia only handles cache misses.

Modern CDNs do way more than static file caching. They terminate TLS, run edge compute (Workers, Functions), provide DDoS protection, handle load balancing, and optimize content on the fly. Some CDNs are essentially programmable reverse proxies at 300+ locations.

The economics are simple: bandwidth from a CDN edge is cheaper than bandwidth from your origin, and it's faster for users. A well-configured CDN can reduce origin traffic by 90%+ and cut page load times in half.

Explore the interactive CDN Backbone Map animation to see how CDN infrastructure spans the globe, and the Cache Hierarchy animation to understand multi-tier cache architecture.

Interactive Animation

Loading animation...

Examples

# Point your domain to a CDN via CNAME
# DNS: www.example.com CNAME www.example.com.cdn.cloudflare.net

# Or configure as origin in CDN dashboard/API
# CloudFront example (Terraform)
resource "aws_cloudfront_distribution" "cdn" {
  origin {
    domain_name = "origin.example.com"
    origin_id   = "myOrigin"
  }
  default_cache_behavior {
    viewer_protocol_policy = "redirect-to-https"
    cached_methods         = ["GET", "HEAD"]
    target_origin_id       = "myOrigin"
  }
}

Video Explanation

Frequently Asked Questions

A distributed network of servers that caches and delivers content from locations close to end users. Reduces latency, offloads origin servers, and improves availability by serving content from the nearest edge.

# Point your domain to a CDN via CNAME
# DNS: www.example.com CNAME www.example.com.cdn.cloudflare.net

# Or configure as origin in CDN dashboard/API
# CloudFront example (Terraform)
resource "aws_cloudfront_distribution" "cdn" {
  origin {
    domain_name = "origin.example.com"
    origin_id   = "myOrigin"
  }
  default_cache_behavior {
    viewer_protocol_policy = "redirect-to-https"
    cached_methods         = ["GET", "HEAD"]
    target_origin_id       = "myOrigin"
  }
}

Related CDN concepts include:

  • Edge Server — A CDN server located at the network edge, close to end users. Handles caching, SSL …
  • Origin Shield — A mid-tier cache layer that sits between edge servers and the origin. Aggregates cache misses …
  • Point of Presence (PoP) — A physical location containing CDN edge servers and networking equipment. PoPs are identified by airport …
  • Anycast — A routing technique where the same IP address is announced from multiple locations worldwide. The …
  • Cache Hit Ratio (CHR) — The percentage of requests served from cache versus total requests. A CHR of 95% means …