A content delivery network (CDN) is a geographically distributed network of edge servers that stores cached copies of your website's assets — images, scripts, fonts, video — and serves them from the location closest to each visitor. That reduces latency, cuts Time to First Byte by 30-70%, and takes load off the origin server.

TTFB improvement
30-70% faster
Category
Content · Performance
Page load improvement
20-60% faster
Difficulty
Intermediate

Every millisecond of load time costs conversions. A CDN turns a New York-hosted site into something that feels local to a user in Sydney — the physics of light dictate that the closer the server, the faster the page.

What is a content delivery network?

A CDN is a network of edge servers spread across data centers around the world. When a user requests your site, instead of that request travelling from Sydney to New York (or wherever your origin server lives), it is served from an edge location in Sydney — a few hundred miles away, not 10,000.

The core promise is proximity. Distance means latency; latency means slower pages; slower pages mean lost conversions and worse rankings. A CDN removes the distance for cacheable content.

Most CDNs also bundle in security features (DDoS mitigation, Web Application Firewall), image optimization, and traffic-spike absorption — but performance is the primary reason to adopt one.

Real latency numbers

A New York-hosted site typically shows a TTFB of 150ms for local users, 400ms for European users, and 800ms for Australian users. With a CDN, all three regions land in the 150-250ms range regardless of location.

Why a CDN matters

Five reasons every site with meaningful traffic runs on a CDN:

  1. Core Web Vitals impact. LCP, INP, and TTFB — Google's ranking signals — all improve with a CDN.
  2. Conversion lift. Amazon documented that every 100ms of latency cost them 1% in sales. Deloitte research puts a 0.1s improvement at a 10% conversion lift on retail sites.
  3. Traffic spike absorption. A viral post, product launch, or seasonal peak that would flatten a single origin server barely dents a CDN.
  4. DDoS + security. The same infrastructure that speeds up delivery also filters malicious traffic before it reaches origin.
  5. Global reach at low cost. Cloudflare's free tier serves unlimited bandwidth; AWS CloudFront and Fastly scale to petabytes without exotic pricing.

How a CDN actually works

The delivery flow has four steps.

# 1. Browser requests an asset
GET /images/product.webp HTTP/1.1
Host: example.com

# 2. DNS routes to nearest edge server, not origin
Edge: Mumbai POP (25ms away)

# 3a. Cache hit — edge serves the asset
HTTP/1.1 200 OK
X-Cache: HIT

# 3b. Cache miss — edge fetches from origin, caches, returns
X-Cache: MISS → store → return

# 4. Future requests in that region served from edge cache

Caching layer

The CDN caches static assets — images, CSS, JS, fonts, video. When cached, users get responses from the edge in tens of milliseconds. When not cached (a "cache miss"), the edge pulls from origin, stores the copy, and serves it — every subsequent request from that region is a cache hit.

Points of presence (POPs)

Each geographic edge location is a POP. Major CDNs run 200-300+ POPs; smaller ones run 20-50. More POPs means shorter distances for more users.

Origin shield

Sits between edge and origin. Aggregates cache-miss requests so the origin server sees one request instead of many.

Types of content a CDN can cache

Content typeCache behaviorNotes
Images, CSS, JS, fontsAlways cachedSet long TTL (30+ days), version filenames
Videos, PDFsAlways cachedStreaming CDNs often specialise here
HTML pagesConfigurableCache-Control headers control TTL
API responsesConfigurableCache GETs; leave POSTs bypassed
Shopping cart / user dataNever cachedBypass rules must be explicit
Real-time / personalised contentBypassedEdge-side personalization is possible but complex

Real CDN performance examples

1. E-commerce site rolling out Cloudflare

An apparel retailer on Shopify enabled Cloudflare for their custom domain. TTFB dropped from 480ms (Europe) to 190ms. Bounce rate on product pages fell 14% within 30 days. LCP moved from 3.2s to 1.8s — passing Core Web Vitals for the first time.

2. Media publisher during a traffic spike

A news site's story went viral overnight — 200,000 concurrent users vs. their usual 3,000. Origin CPU sat at 12% because 96% of traffic was served from CloudFront cache. No downtime, no scaling emergency.

3. SaaS product cutting global TTFB

A B2B SaaS with users across 40 countries moved static assets to Fastly. TTFB variance narrowed from 150-900ms to a consistent 90-200ms globally. Support tickets about "slow app in Asia" dropped to zero.

Both reduce load time. They operate at different layers.

CDN

  • Geographically distributed cache
  • Solves distance / latency
  • External service (Cloudflare, Fastly, CloudFront)
  • Includes security, DDoS, WAF
  • Reduces origin server load

Origin caching

  • Local cache on your server (Redis, Memcached, Varnish)
  • Solves computation cost
  • Internal to your infrastructure
  • Speeds up dynamic content generation
  • Reduces database load

Best practice is both. Origin cache speeds up expensive computations; CDN speeds up delivery of the result.

6 CDN best practices

  1. Set long TTLs for versioned assets. styles.a3f92c.css can cache for a year — the hash changes when the file changes.
  2. Use Cache-Control: immutable on hashed assets. Prevents needless revalidation requests.
  3. Serve images via the CDN's image optimization pipeline. Automatic WebP conversion, on-the-fly resizing, and lazy loading. Cuts image bytes 40-60%.
  4. Purge selectively, not aggressively. Global purges reset all caches — every user in every region hits origin. Purge only the URLs that changed.
  5. Monitor cache hit ratio. Aim for 90%+ on static content. Under 70% usually signals misconfigured Cache-Control headers.
  6. Combine CDN with HTTP/3. Most modern CDNs support HTTP/3 (QUIC); enabling it further reduces handshake latency.
Common trap — assuming CDN removes the need for a fast origin

First-time visitors in a region always hit the origin at least once. If the origin is slow, the first user in every region has a slow experience — and cache misses on dynamic content go straight to origin. CDN is a multiplier of origin speed, not a replacement.

Common CDN mistakes to avoid

  • Caching authenticated content. A logged-in user's dashboard cached at the edge means user A sees user B's data.
  • Forgetting cache invalidation on deploy. Users see stale JS/CSS combinations that break the UI.
  • Ignoring cache hit ratio. A CDN configured wrong can hurt more than help.
  • Overpaying by picking the wrong tier. Cloudflare's free tier covers most sites; upgrades should be driven by specific needs, not defaults.
  • Not testing from multiple regions. Localhost benchmarks lie — measure from where users actually are.

Frequently asked questions

A distributed network of servers around the world that stores copies of your website's assets and delivers them from the server closest to each visitor. That reduces load time and origin-server strain.

Typically 30-70% faster TTFB, 20-50% faster First Contentful Paint, and 20-60% shorter total page load. Gains are largest for users far from your origin.

Yes indirectly. Google uses Core Web Vitals (LCP, INP, CLS) as ranking signals. A CDN improves LCP and TTFB. Faster sites also lower bounce rates.

Static assets by default — images, CSS, JavaScript, fonts, videos, PDFs. HTML pages and API responses are configurable. Personalized content typically bypasses the cache.

If your visitors are all in one region and traffic is under 10k monthly, impact is marginal. For any site with a global audience or image-heavy pages, a CDN pays off from day one — Cloudflare's free tier costs nothing.

How theStacc catches CDN misconfigurations

theStacc's site audit checks whether your CDN is serving assets from the correct edge, whether cache hit ratio is above 90%, and whether HTTP/3 and image optimization are on. When they are not, we surface the exact headers to fix and the estimated LCP improvement per change.

Sources

Akshay VR

Akshay VR

Marketing Head · theStacc · ex-Sr Marketing Specialist, ARKA 360

Akshay leads editorial and content operations at theStacc. He writes about the operational decisions that quietly compound into better rankings — including infrastructure choices most marketing teams outsource to engineers.