checklist

Checklist: Do You Actually Need a CDN?

A practical checklist to understand what CDNs do, what they cache, when they help, and whether your site needs one.

Checklist: Do You Actually Need a CDN?

Content delivery networks are everywhere — but do you actually need one? This checklist helps you understand what CDNs do, what they cache, and when they provide real value versus when they're overkill.


This guide focuses on web literacy — understanding the fundamentals so you can make informed decisions. No exploit techniques, just clarity.


What Is a CDN and What Does It Actually Do?


A Content Delivery Network (CDN) is a geographically distributed network of servers that cache and serve your content from locations close to your users.


The core function:


Instead of every user connecting to your origin server (wherever it's hosted), they connect to a CDN edge server nearby. The CDN fetches content from your origin once, caches it, and serves it to many users from that cache.


What CDNs typically cache:


  • **Static assets**: Images, CSS, JavaScript files, fonts, videos
  • **HTML pages**: When configured with appropriate cache headers
  • **API responses**: Sometimes, if explicitly configured
  • **Entire sites**: For static site generators (no dynamic backend)

  • What CDNs typically do NOT cache by default:


  • Dynamic content that changes per user (personalized pages, user dashboards)
  • Requests with authentication cookies
  • POST/PUT/DELETE requests (only GET/HEAD are cached)
  • Content marked as non-cacheable via HTTP headers

  • The CDN respects your Cache-Control headers. If you set Cache-Control: no-cache, the CDN won't cache it.


    Related: The Journey of a URL explains how requests travel from browser to server.


    ✅ Check 1: Is Your Site's Content Mostly Static?


    Best for CDN: Sites with lots of unchanging files — blogs, marketing sites, documentation, image galleries, video platforms.


    Less benefit: Sites where most content is personalized and dynamic — social media feeds, dashboards, real-time collaboration tools.


    Why this matters:


    CDNs shine when the same content can be served to many users. If every request needs unique content generated on the fly, caching provides little benefit. The origin server still does all the work.


    Example:


  • **High CDN benefit**: A blog post that gets 10,000 views. The CDN fetches it from origin once, serves 9,999 requests from cache.
  • **Low CDN benefit**: A user's personalized newsfeed. Every user sees different content. No shared cache.

  • Exceptions:


    Even dynamic sites benefit from CDN caching of static assets (JS, CSS, images). You can use a CDN for /static/* paths while serving dynamic pages directly from origin.


    ✅ Check 2: Are Your Users Geographically Distributed?


    Best for CDN: Users spread across continents or countries.


    Less benefit: All users in one city or region close to your server.


    Why this matters:


    CDNs reduce latency — the time it takes for data to travel between user and server. A user in Tokyo connecting to a server in New York experiences ~200ms round-trip time just from speed-of-light delays. A nearby CDN edge server in Tokyo drops that to ~10ms.


    How to check:


    Look at your analytics. Where are your users located? If 95% are in one metro area and your server is there too, the latency benefit is minimal.


    Real-world thresholds:


  • **Single region**: CDN latency benefit might be 10-30ms
  • **Transcontinental**: CDN latency benefit can be 100-200ms

  • Learn more: What DNS Does covers the first lookup step in reaching servers.


    ✅ Check 3: Is Your Origin Server Handling the Load?


    Best for CDN: Your server struggles under traffic spikes, slow responses, or high bandwidth costs.


    Less benefit: Low traffic with plenty of server capacity.


    Why this matters:


    CDNs act as a shield. Instead of your origin server handling 100,000 requests per hour, it might only handle 100 (the CDN cache misses). This reduces:


  • **Server load**: Fewer requests to handle
  • **Bandwidth costs**: Most data is served from CDN, not your server
  • **Scaling pressure**: CDN absorbs spikes without you adding servers

  • When to worry about scale:


  • Your site goes down or slows under traffic spikes
  • You're paying high bandwidth bills
  • Response times degrade as traffic increases

  • When NOT to worry:


  • You get 100 visitors/day with room for 10,000
  • Your hosting plan includes unlimited bandwidth
  • Your site loads fast and stays fast under current traffic

  • CDNs won't make a low-traffic site faster if the origin is already fast and nearby.


    ✅ Check 4: Does Your Site Have Large Static Files?


    Best for CDN: High-resolution images, videos, downloadable files, font libraries, large JavaScript bundles.


    Less benefit: Minimal static assets, mostly server-rendered HTML with inline styles.


    Why this matters:


    Large files take time to transfer. A 5MB image from a server 5,000 miles away takes longer than the same image from a nearby CDN edge.


    Size thresholds where CDN helps:


  • **Images**: 500KB+ per image
  • **Videos**: Any video file
  • **JavaScript/CSS**: Bundles over 1MB
  • **Fonts**: Multiple font files (200KB+ total)

  • Additional benefit:


    CDNs often compress files (Brotli, gzip) and serve modern formats (WebP, AVIF) automatically, reducing bandwidth and load time.


    Related reading: HTTP Status Codes Decoded covers how CDNs handle errors and cache misses.


    ✅ Check 5: Do You Care About DDoS Protection and Uptime?


    Best for CDN: Sites that need high availability and protection from attacks.


    Less benefit: Internal tools, prototypes, low-stakes personal projects.


    Why this matters:


    CDNs provide:


  • **DDoS mitigation**: Absorb and filter malicious traffic before it reaches your origin
  • **Failover**: If your origin goes down, CDNs can serve stale cached content
  • **Rate limiting**: Block abusive traffic patterns
  • **Bot protection**: Filter out scrapers and bad bots

  • Even if you don't care about performance, security and reliability might justify a CDN.


    Free CDN options with security:


    Cloudflare's free tier includes DDoS protection and basic security features. Even static sites benefit from this.


    ✅ Check 6: Are You Optimizing for Mobile Networks?


    Best for CDN: Users on mobile, 3G/4G, rural/poor connectivity.


    Less benefit: Users on fast wired connections in urban areas.


    Why this matters:


    Mobile networks have higher latency and lower bandwidth than wired connections. A CDN reduces round trips and connection overhead, which disproportionately benefits mobile users.


    Mobile-specific benefits:


  • Fewer round trips to establish connections
  • Edge servers geographically closer (tower → edge vs. tower → origin)
  • HTTP/2 and HTTP/3 support (reduces latency on mobile)

  • Learn about connections: 7 Things Your Browser Does Before a Page Loads.


    ✅ Check 7: Can You Handle Cache Invalidation?


    Consideration: CDNs cache content, which means updates take time to propagate.


    Good fit: Infrequent updates, versioned assets, or ability to purge cache on demand.


    Poor fit: Constantly changing content with no versioning strategy.


    Why this matters:


    If you update a file on your origin, users might see the old cached version until the cache expires (based on your Cache-Control headers) or you manually purge it.


    How to handle it:


  • **Use versioned URLs**: /static/app.v123.js instead of /static/app.js
  • - CDN caches each version separately

    - Updating means deploying a new version, no purging needed


  • **Set appropriate TTLs**: Short TTLs (5 minutes) for frequently changing content, long TTLs (1 year) for versioned assets

  • **Purge/invalidate**: Most CDNs let you manually purge specific URLs or patterns when you deploy

  • Common mistake:


    Setting cache headers to 1 year on un-versioned assets. Users will see stale content until the cache expires or you purge it.


    Related: HTTP vs HTTPS: What Actually Changes discusses headers and caching context.


    ✅ The Cost Question: Is a CDN Worth Paying For?


    Free options:


  • **Cloudflare Free**: Unlimited bandwidth, basic DDoS protection, global CDN
  • **Vercel/Netlify**: Free tier includes CDN for static sites and serverless functions
  • **GitHub Pages**: Free CDN for static sites

  • When to pay:


  • You exceed free tier limits (rare for small sites)
  • You need advanced features (image optimization, edge compute, detailed analytics)
  • You require SLA guarantees and support

  • Bandwidth pricing:


    CDN bandwidth is often cheaper than origin bandwidth. If you're paying $0.10/GB from your server, CDN might be $0.02/GB.


    Hidden costs:


  • Time to configure caching correctly
  • Debugging cache misses and stale content
  • Vendor lock-in (some CDNs use proprietary features)

  • For most small to medium sites, free CDN tiers are sufficient.


    ✅ Quick Decision Matrix


    Use this to decide if a CDN makes sense:


    | Your Situation | CDN Benefit |

    |--------------------|-----------------|

    | Static site, global users, large images/videos | High — Go for it |

    | Dynamic content, localized users, small files | Low — Probably skip |

    | High traffic, security concerns, mobile users | High — Adds resilience |

    | Low traffic, single region, dev environment | Low — Not urgent |

    | Free tier available, minimal setup | Worth trying — Low risk |


    The Baseline: When CDNs Actually Help


    CDNs provide value when:


  • ✅ You have static or semi-static content that can be cached
  • ✅ Users are geographically distributed far from your origin
  • ✅ You serve large files (images, videos, bundles)
  • ✅ You need DDoS protection and uptime resilience
  • ✅ Your origin server is under load or bandwidth costs are high

  • CDNs are overkill when:


  • ❌ All content is personalized and uncacheable
  • ❌ Users are local and your server is nearby
  • ❌ You have almost no traffic
  • ❌ You're still in development/prototyping

  • The modern default:


    Many hosting platforms (Vercel, Netlify, Cloudflare Pages) include CDNs automatically. You might already be using one without realizing it.




    Quick Reference Checklist


    Before adding a CDN, evaluate:


  • [ ] Mostly static content that can be cached
  • [ ] Geographically distributed users
  • [ ] Large static files (images, videos, bundles)
  • [ ] Traffic or bandwidth concerns
  • [ ] Mobile users or poor connectivity
  • [ ] Security/DDoS concerns
  • [ ] Ability to handle cache invalidation

  • If you checked 3+ boxes, a CDN likely provides meaningful value.




    The Takeaway:


    CDNs cache static content geographically close to users, reducing latency and server load. They help most when content is cacheable, users are distributed, and files are large. For small, local, or highly dynamic sites, the benefit might be minimal.


    Understanding what CDNs cache and when they help lets you decide based on actual needs, not hype.




    Related Reading:


  • [The Journey of a URL](/bits/url-journey) — see how requests travel and where CDNs fit
  • [What DNS Does](/bits/what-dns-does) — understand the lookup step before CDN routing
  • [HTTP Status Codes Decoded](/bits/http-status-codes) — how CDNs handle cache misses and errors
  • [7 Things Your Browser Does Before a Page Loads](/blog/7-things-browser-does-before-page-loads) — the full loading process
  • [HTTP vs HTTPS: What Actually Changes](/blog/http-vs-https-what-actually-changes) — understand caching headers and security



  • *This post is part of Hacking Bits, where we explain how everyday technology works — one bit at a time.*


    Related Posts