Your CDN is the single infrastructure decision that most directly impacts every [Core Web Vital](/resources/glossary/core-web-vitals). It determines your [Time to First Byte (TTFB)](/resources/glossary/time-to-first-byte), influences your [Largest Contentful Paint (LCP)](/resources/glossary/largest-contentful-paint), and — through edge compute and [caching](/resources/glossary/caching) strategy — even affects [Interaction to Next Paint (INP)](/resources/glossary/interaction-to-next-paint). Yet most SMBs and e-commerce sites either use whatever CDN their hosting provider bundles, or pick one based on a 2023 blog post comparison.
2026 CDN Comparison — Quick Overview
Sources: CDNPerf Mar 2026, Radar.Cloudflare.com, PageSpeed Matters benchmarks across 3,200+ sites
| Metric | Cloudflare (Pro) | Bunny.net | Fastly | CloudFront | Winner |
|---|---|---|---|---|---|
| Global P50 Latency | 38ms | 29ms | 42ms | 45ms | Bunny.net |
| PoPs (Points of Presence) | 330+ | 123 | 88 | 600+ | CloudFront |
| Median Cache Hit Ratio | 92% (APO: 97%) | 89% | 85% | 83% | Cloudflare |
| Avg. TTFB (cached) | 42ms | 35ms | 48ms | 52ms | Tie: Bunny / CF |
| DDoS Protection | Unmetered, L3–L7 | Basic L3/L4 | L3/L4 + Shield | Shield ($3k+/mo) | Cloudflare |
| WAF Included | Yes (OWASP rules) | Basic ($9.99+) | Yes (Next-Gen WAF) | AWS WAF ($5/rule) | Cloudflare |
| Pricing Model | $25/mo flat (Pro) | $0.01/GB pay-go | $0.08/GB + compute | $0.085/GB tiered | Cloudflare |
| Est. Cost @ 500GB/mo | $25 | $5 | $40+ | $43 | Bunny.net |
| WordPress Integration | APO — full-page edge cache | Plugin + pull zone | Manual config | Manual config | Cloudflare |
| Shopify Integration | DNS proxy only | Bunny Optimizer | Native (Shopify uses Fastly) | Not applicable | Fastly |
| Best For | SMB, WordPress, all-in-one | Budget perf, media, global | Enterprise, dynamic content | AWS-native stacks | — |
| Overall Score | 9.2 / 10 | 8.8 / 10 | 8.0 / 10 | 7.5 / 10 | Cloudflare |
Key Takeaways
- •Cloudflare (Pro + APO) delivers the best overall value for SMBs and WordPress sites — sub-50ms TTFB globally, 95%+ cache hit ratio with APO, built-in WAF and DDoS protection, and unlimited bandwidth for $25/month. No other CDN matches this price-to-performance ratio for small-to-mid-size sites.
- •Bunny.net achieves the lowest global latency of any CDN tested (29ms median P50) with 123 PoPs across 6 continents, at $0.01/GB — making it the performance leader for latency-sensitive e-commerce and media sites on a budget.
- •Fastly's edge compute (Compute@Edge) and real-time log streaming make it the best CDN for enterprise e-commerce and dynamic content — but at 4–10x the cost of Cloudflare and Bunny.net, it's overkill for most SMB sites.
- •AWS CloudFront integrates deeply with the AWS ecosystem but has the highest complexity and the most unpredictable pricing of the four. Best for teams already invested in AWS infrastructure.
- •Cache hit ratio is the single most impactful CDN metric for site speed — improving from 70% to 95% reduces origin load by 83% and cuts median TTFB by 150–300ms. Most sites leave 15–25% cache hit improvement on the table with simple configuration fixes.
Introduction: Why CDN Choice Is a Competitive Advantage in 2026
Your CDN is the single infrastructure decision that most directly impacts every Core Web Vital. It determines your Time to First Byte (TTFB), influences your Largest Contentful Paint (LCP), and — through edge compute and caching strategy — even affects Interaction to Next Paint (INP). Yet most SMBs and e-commerce sites either use whatever CDN their hosting provider bundles, or pick one based on a 2023 blog post comparison.
The CDN landscape has shifted dramatically. Cloudflare's APO (Automatic Platform Optimization) now caches full HTML pages at the edge for WordPress sites — eliminating the origin server from 95%+ of pageviews. Bunny.net has expanded to 123 PoPs and introduced Bunny Optimizer (image optimization + lazy loading at the edge). Fastly's Compute@Edge runs full applications at the edge with sub-millisecond cold starts. AWS CloudFront has added Origin Shield and real-time monitoring — but at enterprise pricing that makes SMBs wince.
We tested all four CDNs across 3,200+ real-world sites — WordPress, Shopify, WooCommerce, headless — measuring global latency, cache hit ratios, TTFB improvement, and real CrUX impact. We also priced each CDN for typical SMB traffic volumes (50GB to 2TB/month) to give you actual cost comparisons, not marketing page estimates.
This guide is written from our hands-on CDN setup experience. We've configured Cloudflare APO for 400+ WordPress sites, migrated e-commerce stores from CloudFront to Bunny.net, debugged Fastly VCL for Shopify Plus stores, and untangled AWS CloudFront cache behaviors that were costing clients $500/month in unnecessary origin requests. The recommendations here are based on what we've seen work — and what we've seen fail.
1. Why Your CDN Choice Matters More Than Ever in 2026
Three converging trends have made CDN selection a critical performance decision for every site — not just high-traffic enterprises:
60–85%
TTFB reduction from properly configured CDN caching
PageSpeed Matters analysis of 3,200+ CDN-fronted sites, Feb 2026
TTFB Is the CWV Bottleneck Most Sites Can Fix
TTFB (Time to First Byte) isn't an official Core Web Vital, but it's the foundation for LCP. Google's own research shows that sites with TTFB >800ms have almost zero chance of passing LCP (the 2.5s threshold). The fastest way to reduce TTFB is to serve cached content from a CDN edge node close to the user — cutting out the 200–800ms round-trip to your origin server entirely.
Our data across 3,200 sites shows the TTFB impact of CDN choice is dramatic: properly configured CDN caching reduces median TTFB by 60–85%. For a site with 600ms origin TTFB, that's the difference between a 600ms and a 90ms TTFB — giving you an extra 500ms of budget for LCP image loading.
Cache Hit Ratio Determines Your Effective Speed
A CDN is only as fast as its cache hit ratio. If 30% of requests miss the cache and hit your origin server, those visitors experience origin-speed TTFB — negating the CDN's benefit entirely. The median cache hit ratio across all CDN-fronted sites is just 72%. That means nearly 1 in 3 visitors gets no CDN benefit at all.
The difference between a 72% and a 95% cache hit ratio is enormous: at 95%, only 5% of visitors hit your origin. Origin load drops by 83%. TTFB drops by 150–300ms for the median visitor. And your CrUX field data — the data Google uses for rankings — reflects the cached experience.
Security Is Now a CDN Feature, Not a Separate Product
In 2026, DDoS attacks target SMBs and e-commerce sites more than ever — 62% of DDoS attacks now target businesses with fewer than 500 employees. Your CDN's built-in security (WAF, DDoS protection, bot management) determines whether a $20/month attack brings your site down or gets silently absorbed. Cloudflare includes unmetered DDoS protection on all plans. AWS CloudFront Shield Advanced costs $3,000/month. This security gap is as important as the latency gap.
2. Cloudflare Deep-Dive: The SMB All-in-One
Cloudflare has become the default CDN for SMBs and WordPress sites — and for good reason. Its combination of performance, security, and pricing is unmatched at the SMB tier. The Pro plan ($25/month) includes a global anycast network with 330+ PoPs, enterprise-grade DDoS protection, a managed WAF with OWASP rulesets, image optimization (Polish + Mirage), and HTTP/3 + QUIC support.
But Cloudflare's real advantage for website speed is APO (Automatic Platform Optimization) — a $5/month add-on that caches entire HTML pages at the edge for WordPress sites. Without APO, Cloudflare only caches static assets (CSS, JS, images). With APO, every page — including dynamic WordPress pages — is served from the edge. The result: TTFB drops from 400–800ms (origin) to 30–60ms (edge). Cache hit ratio jumps from 60–75% (static only) to 95–98% (full page).
Cloudflare Performance Benchmarks
- •Global P50 latency: 38ms (CDNPerf Mar 2026) — consistent across NA, EU, and APAC.
- •Cache hit ratio (without APO): 75–85% — only static assets cached. HTML always hits origin.
- •Cache hit ratio (with APO): 95–98% — full HTML pages cached at edge. Only logged-in users, cart pages, and POST requests hit origin.
- •TTFB (cached, APO): 30–60ms globally. Sub-40ms in North America and Europe.
- •TTFB (cache miss): 350–600ms — depends on origin server speed. APO reduces miss frequency to 2–5% of requests.
- •Image optimization: Polish (WebP/AVIF auto-conversion) + Mirage (lazy loading + responsive sizing for mobile). Saves 30–50% image bytes.
Cloudflare Security Features (Included in Pro)
- •DDoS protection: Unmetered, L3–L7. Absorbs attacks up to 100+ Tbps. No surge pricing, no bandwidth caps during attacks.
- •WAF: Managed rulesets (OWASP Top 10, Cloudflare specials). Auto-updated. Blocks SQL injection, XSS, and known CVEs.
- •Bot management: Basic bot detection included. Super Bot Fight Mode on Pro — blocks known bad bots, challenges suspicious traffic.
- •Rate limiting: 10 rules on Pro, 100 on Business. Protect login pages, APIs, and checkout flows from brute-force attacks.
- •SSL: Universal SSL (free), Advanced Certificate Manager ($10/month) for custom certificates and Total TLS.
- •Page Shield: Client-side JavaScript monitoring. Alerts on new scripts, detects Magecart-style attacks on checkout pages.
Cloudflare Limitations
- •APO is WordPress-only — Shopify, WooCommerce headless, and custom stacks don't get full-page edge caching without Workers.
- •Free plan performance is significantly worse than Pro — shared SSL, no image optimization, basic WAF only.
- •Cache purge propagation takes 2–5 seconds globally — can cause stale content briefly after publishing.
- •Argo Smart Routing ($5/month + $0.10/GB) needed for optimal routing in APAC and South America.
- •Workers (edge compute) has a learning curve — Wrangler CLI, KV storage, and Durable Objects require developer expertise.
- •Enterprise features (custom cache keys, advanced bot management, dedicated account team) start at $3,000+/month.
Tip
The optimal Cloudflare setup for WordPress: Pro plan ($25) + APO ($5) + Argo ($5 base). Total: $35/month. This gives you sub-50ms global TTFB, 97%+ cache hit ratio, enterprise DDoS protection, and a managed WAF. No other CDN matches this feature set at this price point.
3. Bunny.net Deep-Dive: The Performance-Per-Dollar Leader
Bunny.net is the CDN that performance engineers love and marketing teams have never heard of. Founded in 2015 in Slovenia, it's built a reputation on three things: the lowest latency of any CDN, dead-simple pricing ($0.01/GB in NA/EU), and a developer experience that puts AWS CloudFront to shame.
With 123 PoPs across 6 continents, Bunny.net achieves a median P50 latency of 29ms — the fastest of any CDN we tested. For context, that's 9ms faster than Cloudflare and 16ms faster than CloudFront. On a per-request basis, those milliseconds compound: faster TTFB means earlier LCP, which means better CrUX scores, which means better rankings.
Bunny.net Performance Benchmarks
- •Global P50 latency: 29ms (CDNPerf Mar 2026) — fastest of any major CDN. Exceptional in Europe (18ms P50).
- •Cache hit ratio: 85–92% with proper configuration. Bunny's Perma-Cache feature stores content in secondary storage even after TTL expiry, serving stale-while-revalidate.
- •TTFB (cached): 25–45ms globally. Sub-30ms in Europe. 35–50ms in North America. 40–65ms in APAC.
- •Bunny Optimizer: Edge-based image optimization (WebP/AVIF), lazy loading, and CSS/JS minification. $9.99/month add-on.
- •Storage Zones: Origin shield + persistent edge storage. Reduces origin requests by 90%+ for static sites.
- •Edge Rules: URL-based cache rules, header manipulation, redirects — all configurable via dashboard or API.
Bunny.net Security Features
- •DDoS protection: Basic L3/L4 protection included. L7 DDoS protection available but less sophisticated than Cloudflare's.
- •WAF: Basic WAF available ($9.99/month). Not as comprehensive as Cloudflare's managed rulesets or Fastly's Next-Gen WAF.
- •Token authentication: Signed URLs for protected content. Good for gated downloads, premium media.
- •Geo-blocking: Block or allow traffic by country. Useful for GDPR compliance and regional licensing.
- •SSL: Free SSL on all pull zones. Custom SSL certificates supported. TLS 1.3 by default.
- •No bot management: Unlike Cloudflare and Fastly, Bunny.net doesn't offer dedicated bot detection or challenge mechanisms.
Bunny.net Limitations
- •No full-page HTML caching equivalent to Cloudflare APO — you must configure cache rules manually for HTML.
- •Smaller PoP network (123 vs Cloudflare's 330+) — slightly higher latency in Africa, Middle East, and South America.
- •No edge compute platform — no equivalent to Cloudflare Workers or Fastly Compute@Edge.
- •WAF and security features are basic compared to Cloudflare Pro — not suitable for high-risk e-commerce without additional WAF.
- •No native WordPress plugin — requires manual pull zone configuration or third-party plugins.
- •Support is email-only on standard plans — no phone support or dedicated account managers for SMBs.
Tip
Bunny.net's sweet spot: media-heavy sites (portfolios, video, product images) with global audiences and tight budgets. At $0.01/GB, a site serving 500GB/month pays $5 — with the lowest latency of any CDN. Pair with a separate WAF (Cloudflare free plan DNS proxy) if you need DDoS protection.
4. Fastly Deep-Dive: The Enterprise Edge Platform
Fastly is the CDN that powers Shopify, The New York Times, GitHub, and Stripe. It's built for organizations that need real-time cache purging (150ms global purge), edge compute capabilities, and granular traffic control via VCL (Varnish Configuration Language) or Compute@Edge (Wasm-based edge functions).
For SMBs, Fastly is typically overkill — its pricing model (pay-per-GB with minimum commits), configuration complexity, and enterprise-oriented support make it a poor fit for a $50K/year business. But for Shopify Plus stores and high-traffic e-commerce sites with dynamic content needs, Fastly's real-time capabilities are genuinely differentiated.
Fastly Performance Benchmarks
- •Global P50 latency: 42ms (CDNPerf Mar 2026) — solid but behind Bunny.net (29ms) and Cloudflare (38ms).
- •Cache hit ratio: 80–90% with VCL optimization. Default configuration without VCL customization: 65–75%.
- •TTFB (cached): 35–55ms in NA/EU. 50–80ms in APAC. Consistent but not class-leading.
- •Instant purge: 150ms global cache purge — the fastest in the industry. Critical for news sites and dynamic e-commerce.
- •Compute@Edge: Run full WASM applications at the edge. Sub-millisecond cold starts. Supports Rust, JavaScript, Go.
- •Real-time analytics: Log streaming to any endpoint within 1–2 seconds. No sampling — every request logged.
Fastly Security Features
- •Next-Gen WAF (Signal Sciences): Acquired in 2020, now fully integrated. Best WAF in the CDN space for e-commerce.
- •DDoS protection: L3/L4 included. L7 DDoS mitigation via Next-Gen WAF. No unmetered guarantee like Cloudflare.
- •Bot management: Advanced bot detection with machine learning. Identifies credential stuffing, scraping, and inventory hoarding.
- •TLS everywhere: TLS 1.3, HTTP/3 support, custom certificate management.
- •Edge rate limiting: Per-PoP rate limiting with VCL. More granular than Cloudflare's rule-based approach.
- •PCI DSS Level 1: Certified for payment card processing at the edge. Required for some enterprise e-commerce.
Fastly Limitations
- •Pricing: $0.08/GB minimum (NA/EU), higher in APAC. A site serving 500GB/month pays $40+ — 8x more than Bunny.net.
- •Configuration complexity: VCL is powerful but requires developer expertise. Misconfigurations cause cache misses and downtime.
- •Smaller PoP network (88 PoPs) — fewer edge locations than all three competitors.
- •No free tier — minimum $50/month commitment. Not viable for small sites or testing.
- •Self-service dashboard is improving but still less intuitive than Cloudflare or Bunny.net.
- •Shopify integration is native (Shopify runs on Fastly) but you can't customize VCL on standard Shopify plans — only Shopify Plus with custom Fastly configuration.
Common Pitfall
Fastly's pricing model can surprise you. Unlike Cloudflare's flat-rate or Bunny.net's simple per-GB pricing, Fastly charges per-request fees on top of bandwidth, with minimum monthly commits. A traffic spike during a sale or viral post can generate a significantly higher bill than projected. Always model worst-case pricing scenarios before committing.
5. AWS CloudFront Deep-Dive: The AWS-Native Choice
AWS CloudFront is the CDN you use when you're already in the AWS ecosystem — and often the CDN you migrate away from when you realize how much you're overpaying. With 600+ PoPs (the largest network by count), CloudFront has excellent global reach. But its configuration complexity, opaque pricing, and lack of built-in security features make it a questionable choice for SMBs who aren't running their origin on AWS.
CloudFront's core value proposition is deep integration with AWS services: S3 for origin storage, Lambda@Edge for edge compute, Shield for DDoS, WAF for application firewall, and Route 53 for DNS. If your entire stack is AWS, CloudFront is the path of least resistance. If it's not, every other CDN on this list is easier to set up and cheaper to run.
CloudFront Performance Benchmarks
- •Global P50 latency: 45ms (CDNPerf Mar 2026) — highest of the four CDNs tested. Large PoP count doesn't translate to lowest latency.
- •Cache hit ratio: 75–88% with proper cache behavior configuration. Default CloudFront distributions often have 60–70% hit ratios due to misconfigured cache keys.
- •TTFB (cached): 40–60ms in NA. 50–70ms in EU. 60–90ms in APAC. Consistent but not class-leading.
- •Origin Shield: Additional caching layer that reduces origin load. Adds $0.0090/10K requests. Improves cache hit ratio by 5–15%.
- •Lambda@Edge: Run Node.js or Python at the edge. Higher cold start latency (50–100ms) than Fastly Compute@Edge (<1ms).
- •HTTP/3 + QUIC: Supported since 2023. Reduces connection setup time by 1 RTT — meaningful for mobile users.
CloudFront Security Features
- •AWS Shield Standard: Free L3/L4 DDoS protection. Adequate for basic attacks.
- •AWS Shield Advanced: $3,000/month — L7 DDoS, dedicated response team, cost protection (AWS credits for DDoS-driven bandwidth costs). Enterprise-only pricing.
- •AWS WAF: $5/month per web ACL + $1/rule + $0.60/million requests. Costs scale with traffic. A typical e-commerce WAF config costs $30–80/month.
- •Bot Control: $10/month + $1/million requests. Separate from WAF. Detects scrapers, credential stuffing, and automated abuse.
- •Signed URLs / Cookies: Granular access control for premium content. More flexible than Bunny.net's token auth.
- •Field-Level Encryption: Encrypt sensitive form fields at the edge before they reach your origin. Unique to CloudFront.
CloudFront Limitations
- •Pricing complexity: Per-GB bandwidth + per-request fees + Origin Shield fees + Lambda@Edge invocations + WAF rules. Bills are unpredictable.
- •Configuration complexity: Cache behaviors, origin groups, function associations — the CloudFront console has a steep learning curve.
- •No built-in image optimization — requires Lambda@Edge or a third-party service (Imgix, Cloudinary).
- •Cache invalidation: Free 1,000 invalidations/month, then $0.005/path. Cloudflare and Bunny.net offer unlimited free purges.
- •No equivalent to Cloudflare APO — no one-click full-page caching for WordPress or any CMS.
- •Support: Free plan = forums only. Developer support starts at $29/month. Business support: $100/month minimum.
Tip
If you're on AWS and committed to CloudFront, enable Origin Shield ($0.0090/10K requests) immediately. It adds a regional caching layer between PoPs and your origin, reducing origin load by 40–60% and improving cache hit ratio by 5–15%. It's the single highest-ROI CloudFront feature that most configurations skip.
6. Global Latency Head-to-Head: Region-by-Region Benchmarks
Global averages hide regional differences. A CDN that's fastest in North America may be slowest in Southeast Asia. Here are the region-by-region P50 latency benchmarks from CDNPerf and our own measurements (March 2026).
CDN Latency by Region — P50 in Milliseconds (March 2026)
Source: CDNPerf + PageSpeed Matters testing from 12 global locations
| Region | Cloudflare | Bunny.net | Fastly | CloudFront |
|---|---|---|---|---|
| North America (East) | 28ms | 22ms | 32ms | 35ms |
| North America (West) | 32ms | 25ms | 38ms | 40ms |
| Europe (West) | 25ms | 18ms | 30ms | 38ms |
| Europe (East) | 35ms | 28ms | 45ms | 48ms |
| Asia-Pacific (East) | 55ms | 42ms | 58ms | 52ms |
| Asia-Pacific (SE) | 62ms | 48ms | 65ms | 58ms |
| South America | 78ms | 65ms | 85ms | 72ms |
| Africa | 95ms | 110ms | 120ms | 105ms |
| Middle East | 68ms | 55ms | 75ms | 70ms |
| Australia / NZ | 48ms | 38ms | 52ms | 45ms |
Key Latency Insights
- •Bunny.net leads in 8 of 10 regions — its European infrastructure (founded in Slovenia) gives it exceptional EU performance, and its APAC expansion has closed the gap with CloudFront.
- •Cloudflare wins in Africa — the only CDN with significant PoP coverage across the continent (25+ African PoPs). Critical if you serve African markets.
- •CloudFront's 600+ PoPs don't translate to lowest latency — many are 'lightweight' PoPs with limited caching capacity. Bunny.net's 123 PoPs are all full-capacity nodes.
- •Fastly is consistently 3rd or 4th — its 88 PoPs are concentrated in NA/EU. APAC and emerging markets are weaker.
- •For SMBs with primarily NA/EU traffic (80%+ of e-commerce sites), all four CDNs deliver sub-40ms latency. The real differentiator at this scale is cache hit ratio and pricing, not raw latency.
7. Cache Hit Ratio Benchmarks: The Metric That Actually Matters
Global latency matters — but only for cached requests. If 30% of your visitors hit the origin server because of cache misses, those visitors get origin-speed TTFB regardless of which CDN you use. Cache hit ratio (CHR) is the metric that separates a fast site from one that just has a CDN sticker on it.
Cache Hit Ratio by Configuration Level
Source: PageSpeed Matters analysis across 3,200+ CDN-fronted sites, Feb–Mar 2026
| Configuration | Cloudflare | Bunny.net | Fastly | CloudFront |
|---|---|---|---|---|
| Default / out-of-box | 65% | 70% | 55% | 60% |
| Basic optimization | 82% | 80% | 72% | 73% |
| Proper configuration | 92% | 89% | 85% | 83% |
| Fully optimized (APO/etc.) | 97% | 93% | 90% | 88% |
Why Default Cache Hit Ratios Are So Low
Most CDNs, out of the box, only cache static assets with specific file extensions (.css, .js, .png, .jpg, etc.). They don't cache HTML pages, API responses, or dynamically generated content. This means every page navigation hits your origin server. For a typical content site where HTML represents 40–60% of requests, this default behavior caps your cache hit ratio at 50–65%.
The gap between 'default' and 'fully optimized' is 30–37 percentage points across all four CDNs. That gap represents the difference between a fast site and a slow one — and it's entirely within your control.
8. Real-World Cache Hit Rate Fixes (Beyond the Basics)
Every CDN guide tells you to 'set proper cache headers' and 'cache static assets.' Here are the advanced fixes that actually move your cache hit ratio from 75% to 95%+ — the techniques we use in our CDN setup engagements that most tutorials skip.
Fix 1: Normalize Query Strings
UTM parameters, tracking codes, and A/B test variants create unique cache keys for the same page. example.com/product?utm_source=google and example.com/product are treated as different objects by default. On an e-commerce site running Google Ads, this alone can reduce cache hit ratio by 15–25%.
- •Cloudflare: Page Rule → Cache Level: Ignore Query String. Or Workers: strip utm_ params before cache lookup.
- •Bunny.net: Pull Zone → General → 'Ignore Query Strings' toggle. Or selectively strip specific params via Edge Rules.
- •Fastly: VCL → bereq.url manipulation to strip tracking params before cache lookup. Requires developer.
- •CloudFront: Cache Policy → Query strings: None (or whitelist only functional params like ?size=, ?color=).
Fix 2: Cache HTML with Short TTLs + Stale-While-Revalidate
The biggest cache hit ratio gain comes from caching HTML pages — not just static assets. Most sites skip this because they fear serving stale content. The solution: short TTLs (60–300 seconds) combined with stale-while-revalidate (serve cached content while fetching fresh copy in background).
- •Cloudflare: APO handles this automatically for WordPress ($5/month). For other platforms: Cache-Control: s-maxage=120, stale-while-revalidate=86400.
- •Bunny.net: Set cache TTL to 120s per pull zone. Enable Perma-Cache for stale-while-revalidate behavior.
- •Fastly: beresp.ttl = 120s; beresp.stale_while_revalidate = 86400s; in VCL. Fastly's stale-while-revalidate is the most mature implementation.
- •CloudFront: Cache Policy with min TTL 120s. CloudFront doesn't natively support stale-while-revalidate — you need Lambda@Edge to add the header.
Fix 3: Eliminate Vary Header Chaos
The Vary response header tells the CDN to create separate cache entries for different request variants. A common misconfiguration: Vary: Accept-Encoding, Cookie. The Cookie header is unique per user — so every visitor gets a cache miss. This single header can reduce your cache hit ratio to near-zero.
- •Correct: Vary: Accept-Encoding (only vary on compression support — gzip vs brotli).
- •Remove: Vary: Cookie, Vary: User-Agent, Vary: Accept (unless you're serving different content per variant).
- •WordPress common cause: Plugins setting session cookies on every visitor. Audit cookies with chrome://settings/cookies.
- •Cloudflare APO handles this automatically — it strips problematic Vary headers for cached HTML.
Fix 4: Implement Origin Shield / Regional Caching
Without an origin shield, each CDN PoP independently requests content from your origin. If you have 100+ PoPs and content expires simultaneously, your origin gets 100+ concurrent requests for the same object. Origin Shield adds a regional cache layer: PoPs request from the shield, and only the shield requests from origin.
- •Cloudflare: Argo Tiered Cache (included in Argo at $5/month + per-GB). Reduces origin requests by 50–70%.
- •Bunny.net: Storage Zones act as origin shield. Free with any pull zone. Enable 'Origin Shield' in pull zone settings.
- •Fastly: Shielding — designate a shield PoP per origin. Free on all plans. Reduces origin requests by 60–80%.
- •CloudFront: Origin Shield — $0.0090/10K requests. Must be manually enabled per distribution. Often overlooked.
Fix 5: Separate Static and Dynamic Cache Behaviors
A single cache policy for your entire domain forces a lowest-common-denominator approach. Separate your caching strategy: aggressive caching for static assets (365-day TTL, immutable), moderate caching for HTML (120s TTL + stale-while-revalidate), and no caching for authenticated/personalized content (cart, account, checkout).
- •Static assets (/assets/*, /images/*, *.css, *.js): Cache-Control: public, max-age=31536000, immutable.
- •HTML pages: Cache-Control: public, s-maxage=120, stale-while-revalidate=86400.
- •Authenticated pages (/cart, /account, /checkout): Cache-Control: private, no-store.
- •API responses: Vary by authorization header. Cache public API endpoints (product catalog) for 60–300s.
Common Pitfall
The #1 cache hit ratio killer we see in client CDN audits: WordPress plugins setting session cookies on every visitor — including anonymous ones. WooCommerce, WPML, and some analytics plugins are the worst offenders. Each cookie turns every page into a 'personalized' response that can't be cached. Audit your cookies: if anonymous visitors have any cookies beyond essential ones (consent, currency), you have a cache-busting problem.
9. E-Commerce & Platform-Specific CDN Gains
Different platforms interact with CDNs differently. A CDN configuration that works perfectly for WordPress may actively hurt a Shopify site. Here are the platform-specific considerations:
Shopify & Shopify Plus
Shopify runs on Fastly natively — every Shopify store is already behind Fastly's CDN. You can't replace it, but you can layer Cloudflare in front as a DNS proxy for additional DDoS protection and edge caching of static assets.
Shopify Plus stores can request custom Fastly VCL configuration through Shopify's support — enabling advanced cache rules, custom headers, and edge redirects. Standard Shopify stores have no VCL access.
- •Default Shopify CDN (Fastly): Static assets cached aggressively. HTML is not cached — every page request hits Shopify's origin. Typical cache hit ratio: 50–65%.
- •Shopify + Cloudflare DNS proxy: Adds DDoS protection and can cache static assets at Cloudflare's edge (closer PoPs than Fastly for some regions). Does NOT cache Shopify HTML.
- •Shopify + Bunny.net: Can front Shopify's static assets (images, fonts) via Bunny.net pull zone. Reduces Shopify bandwidth costs and improves APAC latency for images.
- •Key limitation: You cannot cache Shopify HTML pages at a third-party CDN without breaking cart functionality. Dynamic content (cart count, logged-in state) is embedded in every page.
- •Best Shopify speed win: Focus on image optimization (Shopify auto-serves WebP but doesn't serve AVIF) and reducing app JavaScript rather than CDN swapping.
WordPress + WooCommerce
WordPress is the platform with the most CDN flexibility — and the most to gain from proper CDN configuration. Cloudflare APO is the clear winner here.
- •Cloudflare APO: Full-page edge caching for all WordPress pages. WooCommerce cart, checkout, and account pages are automatically excluded. Cache hit ratio: 95–98%. TTFB: 30–60ms.
- •Bunny.net: Manual pull zone configuration. Cache static assets and optionally HTML via edge rules. Requires cache purge on content updates (via WordPress plugin or webhook). Hit ratio: 85–90%.
- •Fastly: Overkill for most WordPress sites. No native WordPress integration. Requires VCL configuration for proper cache behavior. Only justified for high-traffic WP sites (100K+ daily visitors).
- •CloudFront: Works but requires manual cache behavior configuration. No native WP plugin. Origin Shield recommended. Complex and expensive compared to Cloudflare APO.
- •WooCommerce-specific: Cart fragments AJAX requests must bypass CDN cache. Cloudflare APO handles this automatically. All other CDNs require manual cache exclusion rules.
Headless / Jamstack / Next.js
Headless architectures (Next.js, Nuxt, Astro on Vercel/Netlify) typically include their own CDN layer. Adding a third-party CDN in front creates a 'double-CDN' scenario that can increase latency if misconfigured.
- •Vercel Edge Network: Built-in CDN with ISR (Incremental Static Regeneration). Adding Cloudflare in front can help with DDoS but may add latency for cached content.
- •Netlify CDN: Similar to Vercel — built-in CDN with atomic deploys. Third-party CDN in front is usually unnecessary.
- •Self-hosted headless (Node.js origin): Full CDN flexibility. Cloudflare or Bunny.net recommended. Cache API responses at the edge with short TTLs.
- •Best practice: If your hosting provider includes a CDN (Vercel, Netlify, Render), don't add another CDN in front. Use Cloudflare for DNS + DDoS only (DNS proxy mode without caching).
10. 2026 Pricing Comparison: What You'll Actually Pay
CDN pricing is notoriously confusing — especially AWS CloudFront, where your bill depends on bandwidth, requests, Origin Shield, Lambda@Edge invocations, WAF rules, and Shield tier. Here's what each CDN actually costs for typical SMB and e-commerce traffic volumes.
Monthly CDN Cost by Traffic Volume (NA/EU Traffic, March 2026)
Source: Published pricing + PageSpeed Matters client billing data. Includes WAF and basic DDoS protection.
| Monthly Bandwidth | Cloudflare Pro | Bunny.net | Fastly | CloudFront + WAF |
|---|---|---|---|---|
| 50 GB | $25 | $0.50 | $50 min | $12 |
| 200 GB | $25 | $2 | $50 min | $28 |
| 500 GB | $25 | $5 | $55 | $65 |
| 1 TB | $25 | $10 | $95 | $115 |
| 2 TB | $25 | $20 | $175 | $200 |
| 5 TB | $25 | $50 | $400 | $425 |
| 10 TB | $250* | $100 | $750 | $800 |
Pricing Analysis
- •Cloudflare Pro ($25/month) is unbeatable up to ~5TB/month — flat pricing with unlimited bandwidth, WAF, and DDoS included. At 10TB+ you need the Business plan ($250/month).
- •Bunny.net is cheapest at very low (<200GB) and very high (>5TB) traffic — its linear $0.01/GB pricing scales predictably. But you'll spend $10–20/month extra on Bunny Optimizer + WAF add-ons.
- •Fastly's $50/month minimum commitment makes it uneconomical below 500GB/month. At scale (5TB+), negotiated enterprise pricing can be competitive — but you need to commit annually.
- •CloudFront is the most expensive at every tier when you include WAF ($5/rule/month + per-request fees). A typical e-commerce WAF config adds $30–80/month to the CDN bill.
- •Hidden costs: Cloudflare Argo ($0.10/GB), Bunny.net Optimizer ($9.99/mo), Fastly request fees ($0.0075/10K), CloudFront Origin Shield ($0.0090/10K requests).
11. Security & DDoS Protection: The Forgotten CDN Feature
For e-commerce sites processing payments and storing customer data, CDN security features aren't optional — they're a PCI DSS requirement. The security gap between these four CDNs is as significant as the performance gap.
DDoS Protection Comparison
- •Cloudflare: Unmetered L3–L7 DDoS protection on ALL plans (including Free). Industry-leading. Absorbs attacks up to 100+ Tbps with no additional cost or bandwidth surcharges.
- •Bunny.net: Basic L3/L4 DDoS protection included. L7 protection is limited — large application-layer attacks may require manual intervention or escalation to Bunny.net's support team.
- •Fastly: L3/L4 DDoS included. L7 protection via Next-Gen WAF (Signal Sciences) — effective but adds cost. No 'unmetered' guarantee like Cloudflare.
- •CloudFront: Shield Standard (free) covers L3/L4. Shield Advanced ($3,000/month) adds L7 protection, dedicated response team, and cost protection. The price gap is staggering.
WAF (Web Application Firewall) Comparison
- •Cloudflare Pro WAF: Managed rulesets (OWASP Top 10), auto-updated, custom rules. Included in Pro plan. Blocks SQL injection, XSS, RCE, and known CVEs.
- •Bunny.net WAF: Basic WAF available as $9.99/month add-on. Covers common attack vectors but lacks the depth of Cloudflare or Fastly's rulesets.
- •Fastly Next-Gen WAF: The most advanced WAF in the CDN space. ML-powered detection, custom signals, and SmartParse technology. Best for enterprise e-commerce with complex attack surfaces.
- •CloudFront + AWS WAF: $5/web ACL/month + $1/rule/month + $0.60/million requests. Powerful but complex and expensive. Requires manual rule configuration.
Security Recommendation for E-Commerce SMBs
For SMB e-commerce sites, Cloudflare Pro ($25/month) provides the best security value by a wide margin. You get unmetered DDoS protection, a managed WAF, bot detection, and rate limiting — all included. The equivalent security stack on CloudFront (Shield Advanced + WAF + Bot Control) costs $3,100+/month. Fastly's Next-Gen WAF is excellent but typically requires a custom enterprise contract.
If you choose Bunny.net for its latency advantage, we recommend using Cloudflare as your DNS provider (free plan, proxy mode) for DDoS protection, while routing asset delivery through Bunny.net pull zones. This hybrid approach gives you Cloudflare's security + Bunny.net's latency for static assets.
12. Decision Framework: Which CDN Should You Choose?
Based on our testing and 400+ CDN configuration engagements, here's our recommendation framework:
WordPress / WooCommerce site (any size)
Cloudflare Pro + APO
Full-page edge caching, 97% cache hit ratio, WAF, DDoS — all for $30/month. No other CDN matches this for WordPress.
Budget-conscious site with global audience
Bunny.net
Lowest latency (29ms P50) at $0.01/GB. Unbeatable for media-heavy sites under 1TB/month. Add Cloudflare DNS for DDoS.
Shopify / Shopify Plus store
Keep Fastly (default) + Cloudflare DNS
You can't replace Shopify's Fastly CDN. Add Cloudflare DNS proxy for DDoS protection. Focus optimization on images and app scripts.
Enterprise e-commerce (>$10M revenue)
Fastly + Next-Gen WAF
Instant purge, edge compute, PCI compliance, and the best WAF in the CDN space. Worth the premium at enterprise scale.
AWS-native stack (EC2/ECS/Lambda origin)
CloudFront + Origin Shield
Path of least resistance for AWS shops. Enable Origin Shield and proper cache behaviors. Consider Cloudflare if you need better DDoS or simpler WAF.
Headless / Jamstack (Vercel, Netlify)
Use platform's built-in CDN
Don't add a second CDN layer. Use Cloudflare for DNS + DDoS only (proxy mode, no caching).
High-traffic media / video site
Bunny.net + Bunny Stream
Lowest per-GB cost at scale. Bunny Stream for video delivery ($0.01/GB + $0.005/min encoding). Fastly if you need edge compute for video processing.
13. Common CDN Pitfalls That Kill Performance
After configuring CDNs for hundreds of client sites, these are the mistakes we see most often — and each one can reduce your cache hit ratio by 10–30%.
Configuration Mistakes
- •Not caching HTML: The default CDN configuration only caches static assets. HTML pages — your most-requested resource — always hit the origin. Fix: Cache HTML with short TTLs + stale-while-revalidate.
- •Query string chaos: UTM parameters, fbclid, gclid, and tracking params create unique cache keys for identical content. Fix: Strip tracking params before cache lookup.
- •Vary: Cookie header: WordPress plugins and e-commerce platforms set cookies on every visitor, making every request 'unique.' Fix: Audit cookies, restrict to authenticated users only.
- •No origin shield: 100+ PoPs independently requesting the same expired content from your origin = thundering herd problem. Fix: Enable Argo Tiered Cache (Cloudflare), Storage Zones (Bunny), Shielding (Fastly), or Origin Shield (CloudFront).
- •Double-CDN without bypass rules: Putting Cloudflare in front of a Vercel/Netlify CDN without disabling Cloudflare caching = conflicting cache headers, increased latency, and stale content.
- •Forgetting mobile: Some CDNs (especially CloudFront) require Vary: Accept-Encoding to serve different compression to mobile. Misconfigured Vary headers create separate cache entries per device — halving your hit ratio.
Monitoring Mistakes
- •Not monitoring cache hit ratio: If you're not measuring CHR, you don't know if your CDN is working. Check your CDN's analytics dashboard weekly. Target: 90%+ for content sites, 85%+ for e-commerce.
- •Testing from one location: CDN performance varies by region. Test from at least 3 global locations. Use CDNPerf, Pingdom, or WebPageTest with multiple test locations.
- •Ignoring cache MISS reasons: Every CDN logs why a request was a MISS (expired, first-request, vary-mismatch, bypass-rule). Analyze MISS reasons to find fixable cache gaps.
- •Lighthouse testing without CDN: Running Lighthouse from your local machine or a single server location doesn't reflect CDN-cached performance. Test via WebPageTest from the CDN's PoP locations.
- •Not invalidating after deploys: Deploying new CSS/JS without cache purge = users getting old styles/scripts. Implement automated purge in your CI/CD pipeline.
Common Pitfall
The most expensive CDN mistake: choosing CloudFront because 'we're already on AWS' and then never configuring cache behaviors properly. We've audited CloudFront distributions paying $800/month with 55% cache hit ratios — delivering worse performance than a $25/month Cloudflare Pro plan with 97% hit ratio. Your CDN is only as good as its configuration.
14. Conclusion & Next Steps
The CDN market in 2026 has a clear hierarchy for SMB and e-commerce sites:
Cloudflare Pro + APO is the best all-around choice for WordPress/WooCommerce sites and any SMB that wants performance, security, and simplicity in one package. At $30/month for full-page edge caching, enterprise DDoS, managed WAF, and unlimited bandwidth, nothing else comes close on value.
Bunny.net is the performance-per-dollar leader — lowest latency, simplest pricing, and unbeatable for media-heavy or globally distributed sites. Pair it with Cloudflare DNS for security.
Fastly is the right choice for enterprise e-commerce with complex dynamic content needs and budget for premium infrastructure. Its edge compute, instant purge, and Next-Gen WAF are genuinely best-in-class.
AWS CloudFront is the default for AWS-native teams — but it's the most expensive, most complex, and lowest-performing option for SMBs who aren't deeply invested in AWS. If you're using CloudFront simply because your site is on EC2, evaluate Cloudflare or Bunny.net — you'll likely save money and improve performance.
The most actionable takeaway: cache hit ratio matters more than raw CDN latency. A 95% cache hit ratio on a slower CDN beats a 70% hit ratio on the fastest CDN. Start by auditing your current cache hit ratio, implementing the five fixes in Section 8, and re-measuring after 7 days of CrUX data collection.
If you want us to audit your CDN configuration and implement these optimizations, start with a free speed audit. We'll analyze your current cache hit ratio, identify the specific configuration gaps, and provide a prioritized fix list — usually resulting in a 15–25% cache hit ratio improvement within the first week.
Related Resources

Matt Suffoletto
Founder & CEO, PageSpeed Matters
Matt Suffoletto is the Founder & CEO of PageSpeed Matters, a performance optimization consultancy helping businesses improve Core Web Vitals, page speed, and conversion rates. With years of experience optimizing hundreds of sites across Shopify, WooCommerce, WordPress, and enterprise platforms, Matt and his team deliver measurable speed improvements that drive real revenue growth.
