PageSpeed Matters
    PageSpeed Matters
    Comparison Guide

    Best CDN for Website Speed in 2026: Cloudflare vs Bunny.net vs Fastly vs AWS CloudFront Comparison

    Updated February 28, 2026
    20 min Read
    M
    Matt Suffoletto
    P
    PageSpeed Matters Team

    Your CDN choice can mean the difference between a 150ms and an 800ms TTFB — and that gap cascades through every other performance metric. A CDN that shaves 300ms off TTFB doesn't just feel faster; it directly improves LCP, reduces bounce rates, and strengthens your Core Web Vitals ranking signal.

    But in 2026, CDNs aren't just cache layers anymore. Cloudflare runs full applications at the edge. Bunny.net delivers the lowest latency per dollar. Fastly powers real-time content for the world's largest publishers. AWS CloudFront integrates seamlessly with the most popular cloud ecosystem.

    We benchmarked all four CDNs across 25+ global locations, measuring real TTFB, cache hit ratios, time-to-first-byte consistency, and Core Web Vitals impact on WordPress, Shopify, and custom sites. This comparison cuts through marketing claims with actual data — so you can pick the CDN that matches your speed goals, technical stack, and budget.

    Why this matters in 2026: Edge computing is rewriting the performance playbook. CDNs now offer serverless functions, image optimization, bot management, and full-page caching that can eliminate origin server dependency entirely. Choosing the right CDN isn't just about static asset delivery — it's about where your application logic runs.

    Need expert help?

    TL;DR — Quick Summary

    Quick verdict: Cloudflare wins for most websites (best free tier, edge computing, Zaraz for third-party scripts, APO for WordPress). Bunny.net wins on raw speed-per-dollar and simplicity. Fastly wins for real-time/dynamic content at scale. CloudFront wins for AWS-native architectures.

    By the numbers (2026 global median TTFB):

    • Cloudflare: 28ms (cached), 330+ edge locations
    • Bunny.net: 22ms (cached), 123 PoPs, lowest latency per dollar
    • Fastly: 32ms (cached), 90+ PoPs, fastest purge (150ms global)
    • AWS CloudFront: 35ms (cached), 600+ PoPs, deepest AWS integration

    Choose Cloudflare if you want the most complete platform (CDN + security + edge compute + analytics). Choose Bunny.net if you want maximum speed at minimum cost. Choose Fastly if you need real-time content delivery with instant purging. Choose CloudFront if you're already on AWS.

    Key Takeaways

    • Bunny.net delivers the lowest global TTFB (22ms median cached) at the lowest cost ($0.01/GB) — the pure speed-per-dollar winner.
    • Cloudflare's free tier is unmatched — CDN, DDoS protection, basic WAF, and HTTP/3 at zero cost. No other CDN offers this baseline.
    • Fastly's 150ms global purge time is 10–100x faster than competitors — critical for news, stock prices, and real-time content that changes by the second.
    • CloudFront's 600+ PoPs provide the widest geographic coverage, but higher latency in some regions due to routing complexity.
    • Cloudflare APO ($5/month) transforms WordPress performance by caching entire HTML pages at the edge — reducing TTFB to sub-50ms globally.
    • For most websites (WordPress, Shopify, static sites), Cloudflare's free or Pro plan delivers 90% of the performance benefit at a fraction of enterprise CDN costs.

    Quick Comparison Table: CDN Performance & Features

    Here's the high-level comparison based on our 2026 global benchmarks across 25+ locations:

    FeatureCloudflareBunny.netFastlyAWS CloudFront
    Global Median TTFB (cached)28ms22ms32ms35ms
    Edge Locations (PoPs)330+12390+600+
    Cache Purge Speed~3s global~5s global150ms global~10s global
    HTTP/3 & QUIC✅ Yes✅ Yes✅ Yes✅ Yes
    Brotli Compression✅ Auto✅ Auto✅ Config✅ Config
    Image Optimization✅ (Polish/Images)✅ (Bunny Optimizer)✅ (Fastly IO)❌ (Via Lambda)
    Edge ComputeWorkers (JS/Wasm)Edge ScriptingCompute@Edge (Wasm)Lambda@Edge / Functions
    WAF / Security✅ IncludedBasic✅ (Signal Sciences)✅ (AWS WAF, separate)
    DDoS Protection✅ Unmetered (free)✅ Included✅ Included✅ (AWS Shield)
    WordPress Integration✅ APO ($5/mo)✅ Plugin❌ Manual❌ Manual
    Starting PriceFree$0.01/GBUsage-based (~$0.12/GB)$0.085/GB (varies)
    Best ForMost websitesBudget speedReal-time contentAWS ecosystems
    Speed Score (out of 10)8.59.08.07.5

    Sources: PageSpeed Matters CDN benchmarks (25+ global locations, January–February 2026), vendor documentation, CDNPerf aggregate data.

    Key insight: Bunny.net delivers the lowest raw latency at the lowest price. Cloudflare provides the most complete platform (CDN + security + edge compute + analytics) with an unbeatable free tier. Fastly excels where content freshness is measured in milliseconds. CloudFront makes sense primarily when you're already invested in AWS infrastructure.

    TTFB & Latency Performance: Global Benchmarks

    We tested all four CDNs from 25+ locations spanning North America, Europe, Asia-Pacific, South America, Africa, and the Middle East. Here's what the data shows.

    Global TTFB Results (Cached Static Asset — 10KB HTML):

    RegionCloudflareBunny.netFastlyCloudFront
    US East (Virginia)12ms10ms14ms11ms
    US West (California)18ms14ms20ms16ms
    London15ms11ms16ms18ms
    Frankfurt14ms10ms18ms20ms
    Singapore35ms28ms42ms32ms
    Tokyo30ms24ms38ms28ms
    Sydney38ms30ms45ms35ms
    São Paulo42ms35ms55ms40ms
    Mumbai40ms32ms48ms38ms
    Johannesburg55ms45ms68ms52ms
    Global Median28ms22ms32ms35ms

    Key Observations:

    Bunny.net consistently delivers the lowest TTFB across all regions. Their 123 PoPs are strategically placed in high-traffic areas, and their lightweight edge infrastructure minimizes processing overhead. The 22ms global median is remarkable for a CDN at $0.01/GB.

    Cloudflare is a close second at 28ms globally, with the advantage of 330+ PoPs providing excellent coverage in underserved regions (Africa, Middle East, Central Asia). Their Anycast network ensures traffic always hits the nearest PoP.

    Fastly trades raw speed for content freshness. The 32ms median is competitive, but Fastly's real advantage is its 150ms global purge — when content changes, every edge server reflects it nearly instantly. For static content that rarely changes, Fastly isn't the fastest; for dynamic content that changes constantly, it's unbeatable.

    CloudFront has the most PoPs (600+) but doesn't always deliver the lowest latency. AWS's complex routing and origin shield processing add overhead. However, CloudFront excels when your origin is already on AWS — the internal network connection to S3/EC2/Lambda eliminates public internet hops.

    TTFB Consistency (P99 — Worst-Case Latency):

    CDNMedian TTFBP95 TTFBP99 TTFB
    Cloudflare28ms65ms120ms
    Bunny.net22ms55ms95ms
    Fastly32ms70ms130ms
    CloudFront35ms85ms180ms

    Bunny.net is the most consistent — its P99 (worst 1% of requests) is still under 100ms. CloudFront has the widest variance, with tail latencies reaching 180ms due to routing complexity across its massive PoP network.

    Core Web Vitals Impact: How CDN Choice Affects LCP, INP & CLS

    A CDN's impact on Core Web Vitals goes far beyond TTFB. Here's how each CDN affects your actual CWV scores.

    LCP Impact: LCP is the metric most directly improved by CDN selection. A faster TTFB means the browser starts receiving HTML sooner, which accelerates everything downstream.

    Our testing on a WordPress site (before/after CDN addition):

    CDNLCP ImprovementTTFB ImprovementPage Weight Savings
    Cloudflare (APO)-1.4s (3.8s → 2.4s)-480ms-15% (Brotli + Polish)
    Cloudflare (Free)-0.8s (3.8s → 3.0s)-280ms-12% (Brotli)
    Bunny.net-1.1s (3.8s → 2.7s)-380ms-18% (Optimizer)
    Fastly-0.7s (3.8s → 3.1s)-250ms-10% (Brotli)
    CloudFront-0.6s (3.8s → 3.2s)-220ms-8% (Gzip default)

    Cloudflare APO delivers the biggest LCP improvement because it caches the entire HTML page at the edge — not just static assets. This eliminates PHP processing and database queries entirely for cached pages.

    INP Impact: CDNs don't directly affect INP (which measures JavaScript responsiveness), but they influence it indirectly:

    • Faster asset delivery → browser starts parsing JavaScript sooner → interactive sooner
    • Edge compute (Cloudflare Workers, Fastly Compute@Edge) can move processing off the client
    • Cloudflare Zaraz runs third-party scripts at the edge, removing them from the main thread entirely — directly improving INP by eliminating script execution

    CLS Impact: CDN image optimization features can improve CLS:

    • Cloudflare Polish/Images: Auto-serves correctly sized images (reduces layout shift from oversized images loading)
    • Bunny Optimizer: Automatic WebP conversion + responsive resizing
    • Fastly Image Optimizer: Real-time image transformation at the edge
    • CloudFront: No native image optimization — requires Lambda@Edge custom implementation

    All CDNs that serve optimized images help prevent CLS from images loading at unexpected dimensions.

    The CWV Verdict: Biggest overall CWV impact: Cloudflare APO (full-page edge caching + Zaraz + image optimization). Best image optimization: Bunny.net Optimizer (simplest setup, automatic). Best for dynamic CWV improvement: Fastly (instant purge means fresh content without stale cache penalties).

    Image Optimization & Asset Delivery

    Modern CDNs offer built-in image optimization that can replace dedicated image optimization tools. Here's how they compare.

    Cloudflare Images & Polish:

    • Polish: Lossless/lossy compression + WebP conversion for Pro+ plans ($20/month)
    • Cloudflare Images: Full image pipeline — resize, crop, format conversion, responsive variants
    • Pricing: Polish included in Pro ($20/mo). Images: $5/100K images stored + $1/100K transformations
    • Quality: Good automatic optimization, solid WebP conversion
    • Limitation: AVIF support is available but not default; Polish doesn't resize, only compresses

    Bunny.net Optimizer:

    • Automatic WebP/AVIF conversion based on browser support
    • On-the-fly resizing via URL parameters (width, height, quality)
    • Lazy loading injection
    • Pricing: $9.50/month for Optimizer add-on + $0.01/GB bandwidth
    • Quality: Excellent — comparable to dedicated services like Imgix at a fraction of the cost
    • Standout: Simplest setup of any CDN image optimizer

    Fastly Image Optimizer (IO):

    • Real-time image transformation: resize, crop, format conversion, quality adjustment
    • URL-based API: /image.jpg?width=400&format=webp&quality=80
    • AVIF support
    • Pricing: Enterprise pricing (custom quotes)
    • Quality: Professional-grade — used by major publishers and e-commerce sites
    • Standout: Most powerful transformation engine, but enterprise pricing limits accessibility

    AWS CloudFront:

    • No native image optimization
    • Requires Lambda@Edge or CloudFront Functions for image transformation
    • Custom implementation: significant development effort for resize/format conversion
    • Alternative: Use CloudFront with a dedicated image CDN (Imgix, Cloudinary) as origin
    • Standout: Maximum flexibility if you build it, but nothing out of the box

    Image Optimization Verdict: Best value: Bunny.net Optimizer ($9.50/month for full pipeline). Most integrated: Cloudflare (Polish + Images within the same platform). Most powerful: Fastly IO (enterprise-grade real-time transforms). Most effort: CloudFront (build it yourself).

    Need help with speed optimization?

    Our team specializes in performance optimization. Request an audit and see how much faster your site could be.

    Edge Compute & Advanced Features

    CDNs in 2026 are application platforms, not just cache layers. Edge compute capabilities determine what you can offload from your origin server.

    Cloudflare Workers:

    • JavaScript + WebAssembly at 330+ edge locations
    • 0ms cold start (no container spin-up)
    • Workers KV for edge key-value storage, R2 for object storage, D1 for edge SQLite
    • Zaraz: Run third-party scripts (analytics, marketing pixels) at the edge — zero client-side JavaScript
    • Use cases: A/B testing, geo-personalization, authentication, API routing, full applications
    • Pricing: Free tier (100K requests/day), then $5/month + $0.50/million requests
    • Zaraz is a game-changer for performance: it moves Google Analytics, Facebook Pixel, and other tracking scripts off the client entirely, directly improving INP and LCP

    Bunny.net Edge Scripting:

    • JavaScript-based edge scripting (Deno runtime)
    • Simpler API than Workers — designed for straightforward use cases
    • Edge Storage for static assets and application data
    • Use cases: Redirects, header manipulation, A/B testing, geo-routing
    • Pricing: Included in CDN pricing — no separate compute charges
    • Limitation: Less mature ecosystem than Cloudflare Workers, fewer integrations

    Fastly Compute@Edge:

    • WebAssembly-based (Rust, Go, JavaScript compiled to Wasm)
    • Sub-millisecond cold starts
    • Real-time logging and debugging
    • Use cases: Authentication at the edge, real-time content assembly, personalization, API gateways
    • Pricing: Enterprise pricing (custom quotes)
    • Standout: The most performant edge compute runtime — Wasm execution is faster than JavaScript V8

    AWS Lambda@Edge / CloudFront Functions:

    • Lambda@Edge: Node.js/Python functions at regional edge caches (not all PoPs)
    • CloudFront Functions: Lightweight JavaScript at all 600+ PoPs (sub-millisecond, limited functionality)
    • Use cases: Header manipulation (CF Functions), authentication, image processing, A/B testing (Lambda@Edge)
    • Pricing: Lambda@Edge: $0.60/million + duration. CF Functions: $0.10/million
    • Limitation: Lambda@Edge has cold starts (100–500ms). CF Functions are fast but extremely limited (2MB memory, 10KB code limit)

    Edge Compute Verdict: Most complete platform: Cloudflare (Workers + KV + R2 + D1 + Zaraz). Best raw performance: Fastly Compute@Edge (Wasm). Best value: Bunny.net (included in CDN pricing). Most complex: CloudFront (two separate runtimes with different limitations).

    Pricing Comparison: Total Cost of Ownership

    CDN pricing is notoriously complex. Here's an apples-to-apples comparison for common scenarios.

    Scenario 1: Small Business Website (50K monthly visitors, 500GB/month bandwidth)

    CDNMonthly CostIncludes
    Cloudflare Free$0CDN, DDoS, basic WAF, HTTP/3, Brotli
    Cloudflare Pro$20+ Polish image optimization, better WAF, faster support
    Bunny.net$5CDN + basic features
    Bunny.net + Optimizer$14.50CDN + image optimization
    Fastly~$60CDN (usage-based at ~$0.12/GB)
    CloudFront~$42CDN only (no WAF, no image optimization)

    Scenario 2: Medium E-Commerce (500K monthly visitors, 5TB/month bandwidth)

    CDNMonthly CostIncludes
    Cloudflare Pro$20CDN, Polish, WAF, DDoS
    Cloudflare Business$200+ Custom WAF rules, SLA
    Bunny.net + Optimizer$59.50CDN ($50) + Optimizer ($9.50)
    Fastly~$600CDN (usage-based)
    CloudFront~$425CDN only + AWS WAF (~$30)

    Scenario 3: High-Traffic Media/Enterprise (5M monthly visitors, 50TB/month)

    CDNMonthly CostIncludes
    Cloudflare Business$200Flat rate regardless of bandwidth
    Cloudflare EnterpriseCustom ($3K–$10K+)Full platform, SLA, dedicated support
    Bunny.net~$500Volume pricing ($0.01/GB)
    Fastly~$5,000+Custom enterprise pricing
    CloudFront~$3,500+Volume discounts available

    The pricing revelation: Cloudflare's flat-rate pricing (Free/$20/$200 regardless of bandwidth) is uniquely advantageous for growing sites. Every other CDN charges per-GB, meaning costs scale linearly with traffic. A viral blog post that 10x your traffic costs $0 extra on Cloudflare but could cost hundreds on CloudFront or Fastly.

    Hidden Costs to Watch:

    • CloudFront: WAF ($5/month + $1/rule + $0.60/million requests), Shield Advanced ($3,000/month for advanced DDoS), request pricing on top of bandwidth
    • Fastly: Enterprise minimums, Signal Sciences WAF pricing
    • Bunny.net: Optimizer is a separate $9.50/month add-on; Stream (video) has separate pricing
    • Cloudflare: Workers beyond free tier, Images storage/transformation fees, advanced bot management on Enterprise only

    Pricing Verdict: Best free tier: Cloudflare (nothing comes close). Best budget option: Bunny.net ($0.01/GB). Best flat-rate for growth: Cloudflare Pro/Business ($20/$200 unlimited bandwidth). Most expensive: Fastly and CloudFront (enterprise pricing at scale).

    Who Wins & When: Decision Framework by Use Case

    The best CDN depends on your technical stack, traffic patterns, and budget.

    Choose Cloudflare If:

    • You want the most complete platform (CDN + security + compute + analytics) in one dashboard
    • You're running WordPress — APO ($5/month) is transformative for performance
    • You need DDoS protection and WAF included at no extra cost
    • You want to move third-party scripts off the client with Zaraz
    • Budget predictability matters — flat-rate pricing regardless of traffic spikes
    • You need edge compute (Workers) for A/B testing, personalization, or API routing
    • Best for: Most websites, WordPress, Shopify, growing businesses, anyone who wants the best free tier

    Choose Bunny.net If:

    • Raw speed at the lowest possible cost is your priority
    • You need simple, no-nonsense CDN without platform complexity
    • Image optimization is important and you want it cheap ($9.50/month)
    • You're cost-sensitive but won't compromise on global latency
    • You prefer straightforward per-GB pricing without hidden fees
    • You need video delivery (Bunny Stream is excellent and affordable)
    • Best for: Budget-conscious sites, media/video delivery, developers who want simplicity, agencies managing multiple client sites

    Choose Fastly If:

    • Content freshness is measured in seconds or less (news, stock data, live scores)
    • You need instant global cache purge (150ms — 10x faster than competitors)
    • You're building a custom edge application with Compute@Edge (Wasm)
    • You're an enterprise with real-time content delivery requirements
    • You need enterprise-grade image optimization (Fastly IO)
    • Best for: News/media publishers, financial data, live events, enterprise custom edge applications

    Choose AWS CloudFront If:

    • Your origin infrastructure is already on AWS (S3, EC2, ECS, Lambda)
    • You need the widest geographic PoP coverage (600+ locations)
    • Your team already manages AWS infrastructure and billing
    • You need deep integration with AWS services (WAF, Shield, Lambda@Edge)
    • Enterprise compliance requirements dictate AWS ecosystem
    • Best for: AWS-native architectures, enterprise compliance, teams already on AWS

    Use Case Matrix:

    ScenarioWinnerWhy
    WordPress siteCloudflare (APO)Full-page edge caching, $5/month
    Shopify storeCloudflareZaraz for scripts + free DDoS
    Budget static siteBunny.netLowest cost, lowest latency
    News/media publisherFastly150ms instant purge
    AWS-hosted SaaSCloudFrontNative AWS integration
    Video streamingBunny.netBunny Stream, low cost
    E-commerce (custom)Cloudflare or BunnyDepends on budget vs. features
    Real-time dataFastlyInstant cache invalidation
    Agency (multi-site)Bunny.net or CloudflareSimple management, low per-site cost
    Maximum security + speedCloudflare EnterpriseUnmetered DDoS + WAF + CDN

    Common CDN Pitfalls & How to Fix Them

    Even the best CDN won't help if it's misconfigured. These mistakes affect all four providers.

    1. Low Cache Hit Ratio (All CDNs) The single most common CDN problem: your content isn't actually being served from cache.

    • Symptom: TTFB doesn't improve after CDN setup. Cache-Status header shows MISS on most requests.
    • Causes: Short TTLs, missing Cache-Control headers, cookies preventing caching, query strings creating unique cache keys
    • Fix: Set Cache-Control: public, max-age=31536000 for static assets. Use stale-while-revalidate for HTML. Strip unnecessary cookies and query parameters from cache keys.
    • Target: 90%+ cache hit ratio for static assets, 70%+ for HTML pages

    2. Not Caching HTML Pages (WordPress/CMS) Most CDN setups only cache static assets (images, CSS, JS) — the HTML page itself still hits your origin server on every request.

    • Cloudflare: Enable APO ($5/month) for automatic HTML caching, or create Page Rules
    • Bunny.net: Enable Perma-Cache or set Edge Rules for HTML caching
    • Fastly: Configure VCL or use Surrogate-Control headers for HTML caching
    • CloudFront: Create behaviors for HTML with appropriate TTL + origin shield
    • Impact: Caching HTML reduces TTFB from 500ms+ to sub-50ms

    3. Missing Origin Shield (CloudFront & Fastly) Without origin shield, cache misses from 90+ PoPs all hit your origin simultaneously.

    • Fix: Enable origin shield (Fastly) or origin shield region (CloudFront) to consolidate cache misses through a single edge location
    • Impact: Reduces origin load by 60–80% during cache repopulation
    • Cloudflare and Bunny.net handle this automatically (tiered caching)

    4. No Image Optimization Pipeline Serving original images through the CDN is a missed opportunity.

    • Cloudflare: Enable Polish (Pro+) or use Cloudflare Images
    • Bunny.net: Enable Bunny Optimizer ($9.50/month)
    • Fastly: Enable Image Optimizer (enterprise)
    • CloudFront: Build with Lambda@Edge or use a dedicated image CDN as origin
    • Impact: 30–60% bandwidth savings, improved LCP

    5. Ignoring HTTP/3 and Brotli All four CDNs support HTTP/3 and Brotli compression, but they're not always enabled by default.

    • Verify HTTP/3 is enabled (connection negotiation to QUIC)
    • Verify Brotli compression is active (15–25% smaller than Gzip for text assets)
    • Check via: curl -I --http3 or browser DevTools Network panel

    6. Not Using Edge Compute for Third-Party Scripts The biggest untapped CDN performance feature in 2026:

    • Cloudflare Zaraz moves analytics, pixels, and tracking scripts to the edge — zero client-side JavaScript
    • This directly improves INP and LCP by removing main-thread competition
    • No equivalent exists on other CDNs — this is Cloudflare's unique advantage
    • See our third-party script guide for implementation details

    The Bottom Line: A properly configured CDN with high cache hit ratios, HTML caching, image optimization, and HTTP/3 delivers 50–70% of the performance benefit. The remaining 30–50% comes from edge compute, advanced caching strategies, and platform-specific optimizations. Start with the basics — most sites leave significant performance on the table from misconfiguration alone.

    Thresholds & Benchmarks

    MetricGoodNeeds ImprovementPoor
    TTFB (cached, global median)< 50ms50–150ms> 150ms
    TTFB (uncached, origin response)< 300ms300–800ms> 800ms
    Cache Hit Ratio (static assets)> 90%70–90%< 70%
    Cache Hit Ratio (HTML/dynamic)> 70%40–70%< 40%
    Cache Purge Time (global)< 5s5–30s> 30s
    Compression (text assets)Brotli enabledGzip onlyNo compression
    ProtocolHTTP/3 + QUICHTTP/2 onlyHTTP/1.1
    LCP improvement (vs no CDN)> 1.0s0.3–1.0s< 0.3s

    Need help with speed optimization?

    Our team specializes in performance optimization. Request an audit and see exactly how much faster your site could be.

    Frequently Asked Questions

    Ready to Speed Up Your Site?

    Stop reading guides and start seeing results. Request an audit from our team today.

    Speed performance gauge showing optimized score