Search across blog, articles, projects, courses, and community posts
Euroken
@euroken

The modern web runs on CDNs. Over half of all web requests now flow through a content delivery network, and if you count private delivery networks from Netflix, Google, and Meta, CDNs carry well over 70% of the internet's traffic. For anyone running a website in 2026, the question is no longer whether to put a CDN in front of your origin — it's which one and how. This guide explains what CDNs do, why they matter, how the leading providers differ, and the handful of cases where skipping one is actually the right call.
A content delivery network is a geographically distributed mesh of servers that stores copies of your website's content close to your users, so requests don't have to travel back to a single origin server on every page load. Instead of a user in Singapore waiting 200+ milliseconds for bytes to cross the Pacific to your data center in Virginia, they pull those bytes from a cache a few milliseconds away.
That's the simple version. The useful version: a CDN is a globally synchronized cache plus a security layer plus, increasingly, a programmable compute platform — all sitting between your users and your origin infrastructure. It handles HTML, CSS, JavaScript, images, video, fonts, API responses, and (with edge functions) even parts of your application logic.
The machines that actually serve users are called edge servers, grouped into facilities known as Points of Presence (PoPs). Cloudflare operates PoPs in 330+ cities across 125+ countries, Akamai maintains roughly 4,300 edge locations in about 700 cities, and AWS CloudFront runs 750+ edge locations spanning 440+ cities. Cloudflare claims its network now sits within 50 milliseconds of 95% of the world's internet-connected population.
When a user types your URL, DNS routes them to the nearest PoP — either through anycast (a single IP address advertised from every PoP, with internet routing picking the closest one, used by Cloudflare and Fastly) or through DNS-based geo-steering (the traditional Akamai approach). The edge server checks its cache. If it has a fresh copy — a cache hit — it responds in milliseconds. If not — a cache miss — it fetches from your origin server, stores the result, and serves future requests from cache until the content's TTL (time-to-live) expires.
Good CDN configurations achieve 85–95% cache hit ratios on static content, which is why CDNs typically offload 60–95% of traffic from origin servers. Dynamic or personalized content doesn't cache well, but CDNs still accelerate it through TLS termination at the edge, persistent origin connections, route optimization over private backbones, and — increasingly — by running the logic itself at the edge via Cloudflare Workers, Fastly Compute, AWS Lambda@Edge, or Akamai EdgeWorkers.
Speed is revenue. Google's internal research found bounce probability rises 32% as mobile page load goes from 1 to 3 seconds, and 90% from 1 to 5 seconds. Amazon famously measured that every 100 milliseconds of added latency cost about 1% in sales. Vodafone saw an 8% sales lift from a 31% LCP improvement; Renault recorded a 14% bounce-rate drop and 13% conversion lift for every second shaved off LCP. KeyCDN's own measurements show average round-trip times falling 83% when serving from global PoPs versus a single origin.
Those gains flow through directly to SEO. Google's Core Web Vitals — LCP ≤ 2.5s, INP ≤ 200ms (which replaced FID in March 2024), and CLS ≤ 0.1 — are an explicit ranking signal, and a CDN is the single highest-leverage way to improve LCP because it attacks the biggest component: time to first byte. Fastly calls CDN adoption "the fastest and most effective way to improve LCP," and SISTRIX measured a 3.7-percentage-point search-visibility advantage for fast sites after Google's page-experience update.
Then there's scale. When traffic spikes 10× to 100× during a product launch, breaking news event, or flash sale, the CDN absorbs the blast. Cloudflare's network now carries around 81 million HTTP requests per second on average and peaks at 129 million, with 500 Tbps of external capacity as of early 2026 — capacity no individual origin can match. CDNs also convert spiky traffic into predictable origin load: instead of a thundering herd, the origin sees one request per cached asset per TTL window.
DDoS attacks have escalated sharply, and CDNs are the practical defense. Cloudflare mitigated 21.3 million DDoS attacks in 2024 and more than 36 million in the first three quarters of 2025 alone, a 170% jump. The record keeps breaking: a 5.6 Tbps Mirai flood in late 2024 was eclipsed by a 7.3 Tbps attack in May 2025, then an 11.5 Tbps UDP flood in September, a 29.7 Tbps attack in October, and a 31.4 Tbps / 35-second wall of traffic from the Aisuru-Kimwolf botnet in November 2025 — still the largest attack ever publicly recorded. Akamai's 2025 State of the Internet report logged 311 billion web attacks and 7 trillion Layer 7 DDoS attempts, with commerce alone absorbing over 230 billion attacks.
Beyond raw DDoS absorption, modern CDNs bundle Web Application Firewalls, bot management, API security, TLS 1.3 and QUIC termination, managed certificates, and edge-based authentication. According to the HTTP Archive's Web Almanac, 98.8% of mobile requests now use HTTPS, and CDN-served traffic adopts newer protocols faster than origin-served traffic — 87% of CDN requests use TLS 1.3 versus 42% direct from origin. About 21% of global traffic already runs over HTTP/3, with CDNs doing most of the heavy lifting to make that transition painless.
E-commerce is where latency most directly prints money. Shopify Plus, routinely running on Fastly-class infrastructure, handled 200,000 simultaneous visitors during a Kylie Cosmetics lipstick drop — a workload that would flatten an unprotected origin. Retailers lean on CDNs for Black Friday traffic surges, on-the-fly image optimization (WebP/AVIF conversion), and bot management to keep scalpers away from limited drops.
Media streaming is CDN-native. Netflix built its own — Open Connect, with 8,000+ custom appliances embedded free inside 1,000+ ISPs, delivering roughly 95% of Netflix traffic directly from an ISP rack to the viewer. Disney+, Max, and Hulu run multi-CDN architectures across Akamai, CloudFront, and Fastly, orchestrated by traffic managers like NS1 and Cedexis. Google's Media CDN, built atop YouTube's infrastructure, routinely delivers 98%+ cache hit ratios for partners like U-NEXT.
SaaS platforms — Slack, Zoom, HubSpot, Stripe — use CDNs to deliver dashboard bundles globally and to accelerate API calls via private backbones even when responses aren't cacheable. Gaming leans especially heavily on CDNs for patch distribution: a 100 GB game update hitting millions of players simultaneously on release day is an almost purely CDN problem. Steam, Riot, Battle.net, and PlayStation Network all rely on Akamai, CloudFront, or private CDNs for this. News sites depend on instant purge — Fastly's sub-150ms global invalidation is why The New York Times, The Guardian, and Reddit use it to update breaking stories worldwide without waiting for a TTL to expire. And software distribution — npm, Docker Hub, GitHub, PyPI, Apple and Microsoft updates — is essentially a thin layer of metadata over enormous CDN footprints.
The CDN market is a barbell. At one end, hyperscaler-integrated offerings; at the other, specialists competing on performance, price, or developer experience.
| Provider | Network scale | Best at | Pricing model |
|---|---|---|---|
| Cloudflare | 330+ cities, 125+ countries | All-in-one platform, free tier, edge compute (Workers) | Flat per-domain; generous free plan |
| AWS CloudFront | 750+ edge locations, 440+ cities | AWS-native workloads, S3/ALB integration | Per-GB PAYG + new flat-rate plans (Nov 2025) |
| Fastly | ~70–80 high-power PoPs | Instant purge, programmable VCL, WASM edge compute | Usage-based, typically premium |
| Akamai | 4,300+ PoPs, ~700 cities | Enterprise security, regulated industries, API defense | Enterprise contract only |
| Google Cloud CDN / Media CDN | 3,000+ cache locations | GCP workloads, video streaming | Pay-as-you-go, regional tiers |
| Azure Front Door | 118+ edge locations | Microsoft-stack enterprises | Tiered (Standard/Premium) |
| Bunny.net | 119 PoPs, 150+ Tbps | Cost-conscious SMBs, video, indie devs | From $0.005/GB, pure PAYG |
| Vercel / Netlify | ~126 / 200+ edge cities | Jamstack and Next.js teams | Per-seat + usage |
Cloudflare's share is striking: W3Techs shows it serving as reverse proxy for roughly 20% of all websites, including 375 of the top 1,000. But "best CDN" is context-dependent. An AWS-heavy engineering team gets free data transfer to CloudFront and tight IAM integration. A programmable media company will pay Fastly's premium for VCL and instant purge. A bank will choose Akamai for its security stack and compliance posture. A bootstrapped startup might run Cloudflare's free plan for years. A Next.js shop probably wants Vercel's edge and not a standalone CDN at all.
The 2025 outages are worth noting. Cloudflare's November 18, 2025 incident — nearly six hours, caused by a database permissions change that crashed its bot-management feature file — was its worst since 2019 and affected ChatGPT, X, Spotify, Canva, Discord, and many more. A December 5 incident affected 28% of HTTP traffic for about 25 minutes. Single-provider dependence is a real risk; multi-CDN orchestration is a legitimate architecture for high-stakes workloads.
CDNs aren't universal. A Brazilian city-government portal whose entire audience is in São Paulo, with an origin also in São Paulo, often gets lower latency without the extra edge hop. Internal tools behind a VPN gain nothing from public edge infrastructure. Very low-traffic sites — below roughly 10,000 daily visitors — struggle to keep edge caches warm; most requests become misses and the CDN just adds a network hop. Highly personalized dashboards with near-zero cacheable surface area still benefit from TLS termination and connection reuse, but the cost/benefit gets thin. And strict data-residency regimes — Chinese ICP requirements, Schrems II-affected EU flows, certain HIPAA or financial workloads — may forbid caching outside specific jurisdictions entirely, forcing a private CDN or regional-only configuration. Finally, CDNs only speak HTTP-family protocols; real-time trading or custom-UDP applications want something like AWS Global Accelerator instead.
The mechanics are straightforward. Pick a provider based on audience geography, traffic profile, and ecosystem fit. Point a DNS record (usually a CNAME, or full nameserver change for Cloudflare's free tier) at the CDN hostname. Configure an origin, enable a managed TLS certificate (Let's Encrypt via ACM or the CDN's built-in issuer), and — critically — lock down your origin firewall to accept traffic only from the CDN's published IP ranges, or attackers will simply bypass your edge protection.
The configuration that matters most is cache control. Use fingerprinted filenames (app.abc123.js) with Cache-Control: public, max-age=31536000, immutable for static assets; short s-maxage values with stale-while-revalidate for HTML microcaching; and explicit Cache-Control: private, no-store on any authenticated page. The modern CDN-Cache-Control header lets you set different TTLs for edge and browser. Strip unnecessary cookies from cache keys, normalize Vary headers carefully (a stray Vary: User-Agent can destroy hit ratios), and enable Origin Shield or tiered caching to consolidate misses.
Then measure: target an 85–95% cache hit ratio on static assets, instrument Real User Monitoring (Cloudflare Browser Insights, Vercel Analytics, Akamai mPulse, Datadog RUM), and watch Core Web Vitals from actual users rather than synthetic tests alone. The most common production pitfalls are accidentally caching authenticated pages (data leakage between users), forgetting to lock down the origin, over-relying on purges instead of versioned URLs, and underestimating egress costs in South America, the Middle East, and Africa, which typically run 2–3× US/EU pricing.
A CDN used to be a performance optimization. In 2026 it's closer to table stakes: the delivery layer for 54% of the web, the first line of defense against 31-terabit DDoS attacks, the reason your Core Web Vitals are green, and — through edge compute — increasingly the place where your application itself runs. The providers differ meaningfully in price, programmability, and security posture, and the right choice depends on your stack and audience. But for almost any site that serves users across more than one metro area and cares about speed, uptime, or search ranking, the meaningful decision isn't whether to put a CDN in front of your origin. It's how quickly you can get one deployed correctly.
Share this article
Written by
Euroken
@euroken
Sign in to join the discussion
Sign inEnjoyed this? Get more in your inbox.
New tutorials, articles, and projects — no spam.