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.
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).
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.
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.
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.
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).
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.
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.
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.
| Signal | CDN Failure | Origin 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.
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
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:
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
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.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 →