Crescentek

CDN

The first request is slow. Every one after is instant.

A Content Delivery Network puts copies of your assets (images, JS, CSS, videos, sometimes HTML) at edge PoPs worldwide. First request for an asset = slow (pulls from origin). Every subsequent user hits the edge cache — 20× faster. For any site with global visitors, this is the single biggest speed investment.

Cold request · first user
Total latency: 480ms
All caches empty. Request climbs the hierarchy, reaches origin, response populates caches on the way back.
Cache hierarchy
GET /assets/hero.webp
User browser
Edge PoP (L1)
~14ms
Regional cache (L2)
~45ms
Origin shield
~120ms
Origin server
~380ms
Step 1 / 11
Searching cache…
What actually gets cached

Not everything benefits equally.

High cache value
Images
Thumbnails, hero images, product photos. Often the biggest bandwidth share. CDNs auto-optimise (WebP, AVIF) + resize on-demand.
High cache value
CSS + JS files
Bundled assets hashed per build (main.f7a9.css). Cache forever once deployed. The flagship CDN use case.
Essential for video
Video + audio
Video streaming without CDN is infeasible. HLS segments + MP4 chunks delivered edge-close. Required, not optional.
Medium value
Static HTML pages
Blog posts, marketing pages, documentation. Cache for minutes-to-hours. Purge on update. Instant page loads globally.
Use with care
API responses
GET /api/products cacheable with short TTL (30-300s). User-specific responses shouldn't cache. Mind the Vary headers.
Hard
HTML for logged-in users
Per-user HTML can't be cached globally. Edge Side Includes or server-rendered fragments help; otherwise skip and cache just the shell + assets.
The provider landscape

Which CDN for which job.

All CDNs deliver cached assets from edge. The differences are pricing, network quality, developer features, and where they're best at.

Cloudflare
Pricing
Free → Enterprise
What it is
The default. Free tier covers most sites. WAF + DDoS + Workers + DNS bundled. Full-featured.
Best fit
Most Irish SMBs. Start here unless you have a specific reason not to.
BunnyCDN
Pricing
€1-20/mo typical
What it is
Pay-per-GB pricing (€0.005-0.06/GB). Image optimisation built in. Stellar EU performance.
Best fit
Image-heavy sites where predictable per-GB pricing beats bundled plans.
Fastly
Pricing
€50+/mo starter
What it is
Developer-loved. VCL edge programming. Instant purge (~150ms globally). Used by GitHub, NYT, Stripe.
Best fit
Engineering-led sites needing fine cache control + real-time purge.
AWS CloudFront
Pricing
€0.085/GB + requests
What it is
Deep AWS integration. Lambda@Edge for compute. Pricing complex but flexible at scale.
Best fit
AWS-native architectures. Integrates natively with S3, Lambda, API Gateway.
Akamai
Pricing
€500+/mo enterprise
What it is
Enterprise legacy champion. 20+ years of edge network. High-end compliance + support.
Best fit
Regulated enterprises, media/broadcast workloads, government.
KeyCDN
Pricing
€0.04/GB
What it is
Simple, fair pricing (€0.04/GB). Swiss reliability. Light on bells + whistles.
Best fit
Straight-forward static asset delivery where you just want cheap + fast + boring.
The headers that run caching

Cache-Control is where CDN gets configured.

CDN behaviour is controlled by HTTP headers your origin sets. Get these wrong and nothing caches, or the wrong thing caches for too long. These are the ones that matter.

Cache-Control: public, max-age=31536000
Means
Cache on CDN + browser for 1 year
Use when
Hashed/versioned assets (main.f7a9.css). Never stale because filename changes.
Cache-Control: public, max-age=300, s-maxage=3600
Means
Browser 5 min, CDN 1 hour
Use when
Blog posts, marketing pages. Browser fresh enough; CDN holds longer.
Cache-Control: no-store
Means
Don't cache anywhere
Use when
User-specific pages, admin panels, checkout flows. CDN passes through.
Cache-Control: private, max-age=0
Means
Browser OK, CDN no
Use when
Logged-in user dashboards. Browser can cache its own view; edge doesn't.
ETag + If-None-Match
Means
Conditional request with validation
Use when
Saves bandwidth — browser says "I have ETag X, if still valid return 304 Not Modified".
Vary: Accept, Accept-Encoding
Means
Different cached versions per header value
Use when
Serving WebP vs JPEG based on Accept header, or gzipped vs brotli per Accept-Encoding.
Common pitfalls

Where CDN setups go wrong.

Caching personalised content
Logged-in user hits a cached page meant for anonymous users. Shows someone else's account. Wrong cache-control = privacy incident.
Cache invalidation on deploys
Deploy new JS → browsers keep loading old cached version → broken site. Use hashed filenames (main.a7b3.js) so new deploys = new URLs.
Over-long TTLs without purge strategy
1-year TTL + typo in blog post = typo stays cached 1 year. Plan purge-on-update workflow before setting long TTLs.
Ignoring Vary headers
Gzipped asset cached; then served to a browser that can't decode gzip. Set Vary: Accept-Encoding so CDN caches per encoding.
Multiple CDN layers conflicting
Shopify CDN + Cloudflare + browser cache all fighting. When content updates, which cache purges? Consolidate layers or know your priority chain.
Not measuring hit ratio
CDN only helps if requests actually hit edge cache. Check your hit ratio monthly. Below 80%? Something's misconfigured.
Frequently asked

CDN questions.

Still yes. CDN caches at the nearest PoP — Dublin has Cloudflare/Fastly PoPs in-country. Even Irish-to-Irish requests get 10-30ms faster with edge caching vs hitting origin. Plus free WAF + DDoS from Cloudflare. Net win.
Depends on baseline + asset mix. Static-heavy sites: 40-70% faster page loads typically. API-heavy: modest improvement if responses cacheable. International visitors see biggest wins (2-5× faster from distant geography).
Explicit command to CDN: "expire this asset now, refetch from origin". Needed when you update an asset but the filename hasn't changed (typo fix on /about page). Well-architected sites use hash-versioning to avoid purge entirely.
Static HTML with short TTL — yes. User-specific content — only with edge-compute workarounds (Cloudflare Workers, Lambda@Edge). Most dynamic sites cache the shell + assets aggressively, then fetch personalised bits separately.
Depends on config. Default: cached assets still served; new/uncached requests fail. With "stale-while-revalidate" config: serve stale until origin recovers. Cloudflare's "Always Online" serves cached snapshots when origin 5xx. Architect this based on tolerance for staleness.

CDN is table stakes. Let's set yours up.

30-minute performance call. Share your site, current hosting, traffic patterns. We'll sketch the CDN setup — which provider fits, cache rules, purge workflow. Most sites see 40-70% faster page loads after.