Multi-CDN

Architecture

Using two or more CDN providers simultaneously to improve performance, availability, and negotiating leverage. Traffic is split or failed over between providers based on performance, cost, or geography.

Updated Mar 9, 2026

Full Explanation

Multi-CDN is insurance plus optimization. No single CDN is fastest everywhere, and any CDN can have outages. By using multiple providers, you route each user to whichever CDN is performing best for their location right now.

There are different approaches. Active-active: split traffic across CDNs constantly, usually via DNS-based load balancing or a traffic manager. Active-passive: use one CDN as primary, fail over to the backup if it degrades. Geographic: use CDN A in Europe, CDN B in Asia based on regional strengths.

The complexity cost is real. You need consistent configuration across providers (same caching rules, same security policies), a way to measure and compare performance (RUM data), and a traffic steering layer. But for businesses where downtime means lost revenue, multi-CDN is worth it.

See the interactive Multi-CDN Load Balancing animation in the course to explore traffic distribution and failover scenarios.

Interactive Animation

Loading animation...

Examples

# DNS-based multi-CDN with weighted routing (Route53)
resource "aws_route53_record" "cdn" {
  zone_id = aws_route53_zone.main.id
  name    = "cdn.example.com"
  type    = "CNAME"
  
  weighted_routing_policy { weight = 70 }
  set_identifier = "cloudflare"
  records = ["cdn.example.com.cdn.cloudflare.net"]
}

resource "aws_route53_record" "cdn_backup" {
  zone_id = aws_route53_zone.main.id
  name    = "cdn.example.com"
  type    = "CNAME"
  
  weighted_routing_policy { weight = 30 }
  set_identifier = "fastly"
  records = ["cdn.example.com.global.fastly.net"]
}

Video Explanation

Frequently Asked Questions

Using two or more CDN providers simultaneously to improve performance, availability, and negotiating leverage. Traffic is split or failed over between providers based on performance, cost, or geography.

# DNS-based multi-CDN with weighted routing (Route53)
resource "aws_route53_record" "cdn" {
  zone_id = aws_route53_zone.main.id
  name    = "cdn.example.com"
  type    = "CNAME"
  
  weighted_routing_policy { weight = 70 }
  set_identifier = "cloudflare"
  records = ["cdn.example.com.cdn.cloudflare.net"]
}

resource "aws_route53_record" "cdn_backup" {
  zone_id = aws_route53_zone.main.id
  name    = "cdn.example.com"
  type    = "CNAME"
  
  weighted_routing_policy { weight = 30 }
  set_identifier = "fastly"
  records = ["cdn.example.com.global.fastly.net"]
}

Related CDN concepts include:

  • Origin Health Check — Periodic requests to a specific endpoint (usually /health or /ping) to verify the origin is …
  • Anycast — A routing technique where the same IP address is announced from multiple locations worldwide. The …
  • Failover — Automatically switching to a backup server, origin, or CDN when the primary one fails. Good …