CDN Guide

What Is a CDN? How Content Delivery Networks Affect Website Availability

A CDN caches static assets at globally distributed PoPs and proxies every request before it reaches your origin. This makes sites faster — but also means a CDN failure takes down your entire site even when your origin server is perfectly healthy.

The Core Risk

A CDN in full-proxy mode is a single point of failure for 100% of your traffic. Every HTTP request from every user in the world passes through the CDN before reaching your origin. If the CDN fails — BGP misconfiguration, DDoS overwhelm, software bug — all requests return CDN-generated error pages. Your origin can be perfectly healthy and returning HTTP 200, and every user still sees a 5xx error. This is why CDN selection and multi-CDN architecture directly determine your site’s real-world availability ceiling.

How a CDN Works — Edge Caching, PoPs, and Origin Pull

A CDN is a globally distributed network of proxy servers (Points of Presence, or PoPs) that sit between end users and your origin server, caching static content and proxying dynamic requests. When a user in Tokyo requests your site hosted in Virginia, their browser connects to the nearest CDN PoP (probably in Tokyo or Osaka) rather than routing 11,000 km across the Pacific to your origin. The CDN PoP either serves the request from its local cache (cache hit) or forwards it to your origin server and caches the response for subsequent requests (cache miss with origin pull).

👤
User Browser
Tokyo, Japan
→
🏭
Anycast DNS
Routes to nearest PoP
→
✅
CDN PoP — Tokyo
Cache HIT: serves immediately, ~5ms
👤
User Browser
Tokyo, Japan
→
↻
CDN PoP — Tokyo
Cache MISS: must fetch from origin
→
📂
Origin Server
Virginia, USA — ~140ms RTT
Cache hit — served from PoP edge
Cache miss — origin pull required
Origin server

CDNs operate in two distinct modes that have very different failure implications. In DNS-only mode (Cloudflare’s grey-cloud, also called DNS proxy disabled), the CDN acts only as a DNS nameserver and returns the origin’s real IP. User traffic goes directly to the origin without passing through the CDN. In this mode, a CDN outage does not affect user-facing availability. In full proxy mode (Cloudflare orange-cloud, Fastly, Akamai, CloudFront all operate this way by default), every HTTP/HTTPS request from every user passes through the CDN. The CDN’s network is in the critical path for 100% of traffic — making it a mandatory dependency for availability.

The CDN caches responses based on HTTP cache headers: Cache-Control: max-age=86400 instructs the CDN to serve the cached response for 24 hours without re-fetching from the origin. For dynamic content (API responses, user-specific pages), the origin typically sets Cache-Control: no-cache, private to prevent CDN caching — every such request must transit the CDN and reach the origin, so the CDN provides network optimization (TLS termination near the user, HTTP/3 support, TCP optimization) but not caching benefits for those requests.

How CDN Failures Cause Complete Website Outages (Even When Origin Is Up)

A CDN failure in full-proxy mode is functionally equivalent to your origin going down, from every user’s perspective — even if your origin server is fully operational and returning HTTP 200 to internal monitoring. The failure is in the network path that every user must traverse before their request reaches your origin. CDN failures produce distinct error signatures that differ from origin failures, and identifying the failure type determines where the fix lives.

Failure Mode 1

BGP Route Withdrawal / Misconfiguration

The CDN’s Autonomous System withdraws its BGP route announcements, making its anycast IP ranges unreachable from the global internet. Users cannot even establish a TCP connection to the CDN PoP. Browsers receive ERR_CONNECTION_TIMED_OUT. This was the mechanism behind the June 2022 Cloudflare outage (19% of internet traffic affected) and the June 2021 Fastly outage.

Failure Mode 2

Origin Pull Failure (502/504)

The CDN’s PoPs are reachable but cannot establish connections to your origin server. Users see CDN-generated 502 (Bad Gateway) or 504 (Gateway Timeout) error pages. For Cloudflare, this produces error codes 521 (origin refused connection) or 522 (TCP timeout). Your origin may be up but unreachable from Cloudflare’s IP ranges due to firewall rules, SSL mismatches, or origin server overload.

Failure Mode 3

Cache Poisoning / Stale Cache Serving

The CDN serves a stale or incorrect cached response to users. The origin is returning correct content, but the CDN PoP is serving a cached error page, outdated HTML, or a different domain’s content (cache key collision). This produces partial failures where some users see correct content (those who trigger cache misses) and others see stale content (those served from cache).

Failure Mode 4

SSL / TLS Certificate Failure

The CDN’s edge certificate expires or is misconfigured, causing TLS handshake failures for all HTTPS connections. Browsers display certificate error warnings and block access entirely with no HTTP error page. This affects 100% of HTTPS traffic (virtually all modern web traffic) simultaneously. CDN-managed certificates (Cloudflare Universal SSL, CloudFront ACM) eliminate this risk by automating renewal.

Failure Mode 5

Rate Limiting / Under Attack Mode

During a large DDoS, the CDN activates aggressive traffic mitigation (Cloudflare Under Attack Mode, Akamai Prolexic) that blocks legitimate traffic along with attack traffic. Users see CAPTCHA challenges or 503 responses. This is technically the CDN working as designed but can cause significant legitimate user impact during large attack events.

Failure Mode 6

Configuration Propagation Error

An incorrect CDN configuration change (routing rule, firewall rule, redirect, WAF policy) propagates globally across all PoPs simultaneously. Because CDN configurations are pushed to thousands of servers in seconds, a single misconfiguration can cause an instant global outage. Customer configuration errors are responsible for a significant portion of CDN-related outages that are not caused by the CDN provider itself.

The Fastly lesson: In June 2021, a single valid customer configuration change triggered an undetected software bug that caused 85% of Fastly’s network to return 503 errors within 60 seconds. Amazon, Reddit, GitHub, Twitch, The Guardian, and the UK government website all went down simultaneously — not because they had failures, but because they shared a CDN provider. The outage lasted 49 minutes. CDN concentration risk is one of the most underappreciated sources of correlated failure in modern web infrastructure.

CDN vs Origin: How to Distinguish a CDN Failure from an Origin Failure

The first diagnostic step for any 5xx error on a CDN-proxied site is determining whether the failure is in the CDN layer or the origin layer, because they require completely different fixes. A CDN failure requires action at the CDN (configuration rollback, waiting for provider recovery, activating a backup CDN). An origin failure requires action on your server (restarting processes, scaling resources, rolling back deployments). Confusing the two wastes critical time during an active incident.

SignalCDN FailureOrigin Failure
Error page branding CDN logo/styling visible (Cloudflare, Fastly, Akamai error pages have distinctive designs) Plain server error page, framework error page (Django, Rails), or generic nginx/Apache error
HTTP error code 520–527 (Cloudflare), Fastly-branded 503, Akamai Reference # in error page 500, 502, 503, 504 without CDN branding; or a 200 response with error content
Response headers CF-Ray header present (Cloudflare), X-Served-By shows CDN edge node, Server: cloudflare Headers from your application server: Server: nginx/1.24, X-Powered-By: PHP, or custom headers
Direct origin test Querying origin IP directly returns HTTP 200; the failure is only when going through CDN Querying origin IP directly also returns an error or times out
Geographic scope Often affects specific CDN PoPs or regions; users in different continents may have different experiences Uniform failure globally; all CDN PoPs fail to reach origin identically
DownCheck probes Railway HTTP probe succeeds (bypasses Cloudflare); Cloudflare Edge probe fails Both Railway HTTP and Cloudflare Edge probes fail simultaneously

Check CF-Ray header: Every response through Cloudflare includes a CF-Ray header (e.g., CF-Ray: 8a3f2c1b4d5e6f7a-SIN). The 3-letter airport code suffix identifies the PoP that served the request. If you see a CF-Ray on an error page, the request reached Cloudflare but failed between Cloudflare and your origin — an origin-pull failure, not a Cloudflare network failure.

The Major CDNs and Their Market Share (Cloudflare, Fastly, Akamai, AWS CloudFront)

CDN market share concentration directly determines the blast radius of a CDN outage — the more websites on a single CDN, the more users are affected when that CDN fails. The CDN market has consolidated significantly: four providers now account for the majority of CDN-proxied traffic on the internet. Understanding each provider’s architecture, PoP count, and historical incident record is essential for evaluating concentration risk when choosing infrastructure.

Cloudflare
~20% of all HTTP traffic

The largest CDN by traffic share. Operates a reverse proxy (not just static asset caching) for all customer traffic in orange-cloud mode. Used by millions of websites including major SaaS platforms, news sites, and e-commerce stores. AS13335. Provides DDoS mitigation, WAF, DNS, and Workers edge compute on the same network.

Notable incidents: June 2022 global outage (BGP misconfiguration, 19% of internet affected, 37 min). July 2023 partial outage (DDoS against Cloudflare infrastructure itself).

310+ PoPs
Akamai
~15–20% enterprise traffic

The oldest major CDN, founded 1998. Dominant in enterprise, media streaming, and government sectors. Operates a different architecture from Cloudflare: decentralized “intelligent platform” with servers embedded in ISP networks globally rather than large centralized PoPs. Provides Prolexic DDoS scrubbing as a separate service layer.

Most resilient to single-PoP failures due to distributed architecture. Higher cost tier targets enterprise contracts rather than self-service.

4,000+ distributed servers
AWS CloudFront
~10–15% of CDN market

Amazon’s CDN, deeply integrated with S3, EC2, ALB, and Lambda@Edge. Dominant in AWS-native architectures. Because it runs on AWS infrastructure, a us-east-1 AWS outage can cascade into CloudFront availability, creating correlated failures for sites hosted on AWS with CloudFront. Supports Lambda@Edge and CloudFront Functions for edge compute.

Market position: default choice for teams already in the AWS ecosystem. Less common for non-AWS origins.

600+ PoP locations
Fastly
~5% of CDN market

Premium CDN focused on real-time cache purging and edge compute (Compute@Edge using WebAssembly). Favored by large media companies (Financial Times, New York Times, GitHub) for its instant cache invalidation (<150ms globally). Smaller PoP count than Cloudflare but higher capacity per PoP.

Notable: June 2021 global outage (49 min, customer config triggered software bug, 85% of network offline). Despite smaller share, affected disproportionately high-profile sites.

80+ PoPs

The practical risk calculation: if you use only one CDN, your site’s availability ceiling is bounded by that CDN’s availability. Cloudflare has historically achieved 99.99%+ availability for its network layer, but individual incidents demonstrate that even the best CDN can fail completely. For sites where downtime cost justifies the engineering investment, multi-CDN routing (using a DNS-based traffic manager to split traffic across two CDN providers) eliminates CDN provider as a single point of failure.

BGP Routing and CDN Anycast — Why CDN Outages Are Instant and Global

CDNs use anycast routing — a network topology where the same IP address is announced from hundreds of locations simultaneously via BGP, so each client’s request is automatically routed to the topologically nearest server. When you type 104.16.132.229 (a Cloudflare IP), your ISP’s router forwards your packet toward whichever Cloudflare PoP has the shortest BGP path from your location. You connect to the Singapore PoP if you are in Southeast Asia, the Frankfurt PoP if you are in Europe, and the Ashburn PoP if you are on the US East Coast — all using the same destination IP address.

Anycast: One IP, Many Servers

User — Tokyo
BGP shortest path → NRT PoP
104.16.132.229 Same anycast IP — all regions
User — London
BGP shortest path → LHR PoP
User — São Paulo
BGP shortest path → GRU PoP
 
User — Sydney
BGP shortest path → SYD PoP
All users connect to the same IP but reach the nearest physical server. No DNS-based geo-routing required.

The power of anycast is also its failure risk: when a BGP misconfiguration causes a CDN to withdraw its route announcements globally, every anycast PoP simultaneously becomes unreachable from every network path. The failure is not gradual — it happens in seconds as BGP route withdrawal propagates through the global routing table. There is no fallback because the failure is at the routing layer, below DNS. Users cannot reach the CDN’s IP addresses from anywhere in the world until the correct BGP routes are re-announced and propagated.

This is fundamentally different from a unicast (traditional) server failure, where only clients routing through that specific server are affected. Anycast scales performance globally but also scales failures globally — the same property that makes a CDN fast makes its failures instant and universal. The Cloudflare June 2022 incident affected users in every country simultaneously within seconds of the misconfiguration because BGP withdrawal propagated globally faster than the engineering team could detect and roll back the change.

How to Bypass a CDN to Test Origin Directly

Bypassing the CDN to query your origin server directly is the definitive test to determine whether a 5xx error is a CDN failure or an origin failure. If the origin returns HTTP 200 when queried directly but users see errors through the CDN, the CDN is the failure. If the origin also returns an error when queried directly, the origin is the problem regardless of what the CDN is doing.

To bypass the CDN, you need your origin server’s real IP address. Find it by: checking your hosting dashboard, running dig +short origin.yourdomain.com if you have a separate origin hostname, or looking in your CDN provider’s dashboard where your origin IP is configured. Once you have the origin IP:

Test origin directly (HTTP) — works when origin IP is known
curl -I -v https://YOUR_ORIGIN_IP \ --header "Host: yourdomain.com" \ --resolve yourdomain.com:443:YOUR_ORIGIN_IP
Test with explicit host override (bypasses DNS & CDN)
curl -I -v https://yourdomain.com \ --connect-to yourdomain.com:443:YOUR_ORIGIN_IP:443
Check what IP your domain currently resolves to (confirm CDN is in path)
dig +short yourdomain.com # If result is a CDN IP range, CDN is in full proxy mode # Cloudflare IPs: 104.16.0.0/13, 172.64.0.0/13, etc.
Verify response headers to confirm CDN is proxying
curl -sI https://yourdomain.com | grep -i "server\|cf-ray\|x-served\|via"

When running the direct origin test, pay attention to the TLS certificate: if your origin uses a Cloudflare Origin Certificate (valid only for Cloudflare-to-origin connections), querying the origin directly will produce a TLS certificate error from your browser or curl. Use curl -k (insecure) to bypass the certificate check when testing origin connectivity directly, and understand that the certificate error does not indicate an application failure.

Cloudflare IP ranges: If dig +short yourdomain.com returns an IP in Cloudflare’s published IP ranges (https://www.cloudflare.com/ips/), your site is fully proxied through Cloudflare. Your real origin IP is not publicly visible — it is only exposed if your origin is also reachable via other DNS records (mail server A records, historical DNS records in tools like SecurityTrails) or if your server sends the origin IP in response headers.

How DownCheck Distinguishes CDN-Layer from Origin-Layer Failures

DownCheck’s two-probe HTTP architecture is specifically designed to distinguish CDN-layer failures from origin-layer failures — a distinction that single-probe monitoring tools cannot make. The Railway HTTP probe sends requests from infrastructure that does not route through Cloudflare. The Cloudflare Edge probe sends a fetch() from a Cloudflare Worker, which routes through Cloudflare’s own edge network. Comparing the two probe results reveals exactly which layer is failing.

① Railway HTTP Probe

  • Originates from Railway’s US infrastructure (separate ASN from Cloudflare)
  • Routes directly to the domain’s CDN endpoint or origin
  • A fail here means the CDN itself is not responding, or the origin is returning errors
  • A pass here means the CDN network layer is reachable

② Cloudflare Edge Probe

  • Originates from a Cloudflare Worker running at the nearest CF PoP
  • Routes from Cloudflare’s edge directly to the origin server (bypasses public CDN path)
  • A fail here means Cloudflare cannot reach the origin (origin-pull failure)
  • A pass here means the origin is responding to Cloudflare’s requests
Railway Probe CF Edge Probe DNS Probe Diagnosis
✓ 200 ✓ 200 ✓ Resolves Site is fully up — all layers healthy
✓ 200 ✗ Fail ✓ Resolves CDN-to-origin failure. Origin is up (Railway probe succeeds), but Cloudflare cannot reach origin. Check Cloudflare 52x error code, origin firewall rules, SSL config.
✗ Fail ✓ 200 ✓ Resolves CDN network failure. Cloudflare edge is serving cached content, but Railway (non-CF path) cannot reach the CDN. BGP or routing issue on Cloudflare’s public network.
✗ Fail ✗ Fail ✓ Resolves Origin is down. DNS resolves, but origin is returning errors or not responding from any network path. Check origin process, database, deployment.
✗ Fail ✗ Fail ✗ NXDOMAIN DNS failure. Domain not resolving from any resolver. Check authoritative nameserver, NS records, DNSSEC chain.

This 5-scenario matrix covers every meaningful failure state for a CDN-proxied website. No single-probe monitoring tool can distinguish row 2 (CDN-to-origin failure) from row 3 (CDN network failure) from row 4 (origin down) — all three look identical to a single external HTTP probe: the site returns errors. DownCheck’s multi-probe architecture surfaces the failure layer explicitly, reducing the time spent diagnosing the wrong system during an active incident.


Frequently Asked Questions

What is a CDN?
A CDN (Content Delivery Network) is a globally distributed network of proxy servers (Points of Presence, or PoPs) that cache static content close to end users and proxy dynamic requests to origin servers. CDNs reduce latency, absorb traffic, and provide DDoS protection — but in full-proxy mode, they also become a mandatory dependency in the critical path for 100% of user traffic.
Can a CDN cause a website to go down even if the origin server is working?
Yes. When a CDN is in full-proxy mode, every HTTP request passes through the CDN before reaching the origin. If the CDN fails — BGP misconfiguration, DDoS overwhelm, software bug, TLS failure — all traffic returns CDN-generated error pages even though the origin server is fully operational. The CDN is a mandatory dependency in the critical path for all user-facing traffic.
How do I know if an outage is from the CDN or the origin server?
Check the error page for CDN-specific branding or error codes (Cloudflare 520–527, Fastly-branded 503, Akamai Reference # in error page). Then bypass the CDN: curl -I https://ORIGIN-IP --header "Host: yourdomain.com". If the origin returns 200 while CDN users see errors, the CDN is the failure. If the origin also fails, the origin is the problem. DownCheck’s dual-probe system identifies the failing layer automatically.
What is a CDN PoP?
A PoP (Point of Presence) is a CDN’s physical server cluster in a data center, typically located at or near an Internet Exchange Point (IXP). Each PoP stores cached content and handles requests from nearby users via anycast BGP routing. Cloudflare operates 310+ PoPs globally; Akamai distributes 4,000+ servers embedded in ISP networks.
What is anycast and why do CDNs use it?
Anycast is a network addressing method where multiple servers share the same IP address, and BGP routing directs each client’s request to the topologically nearest server. CDNs use anycast so that a single IP routes to whichever PoP is closest to the requesting client. The downside: a global BGP misconfiguration simultaneously affects all anycast destinations, making failures instant and global rather than localized.
How does DownCheck detect CDN-layer vs origin-layer failures?
DownCheck dispatches two independent HTTP probes: one from Railway infrastructure (bypasses Cloudflare) and one from a Cloudflare Worker at the edge. If Railway fails but CF Edge succeeds, the CDN network is down while origin serves CF’s cache. If CF Edge fails but Railway succeeds, CF cannot reach the origin. Both failing means the origin itself is down. This 3-state comparison identifies the failure layer without requiring manual diagnosis.

Is it the CDN or the origin?

DownCheck’s dual HTTP probes tell you in seconds whether the failure is in the CDN layer or at your origin server.

Run a probe now →