Content Delivery Networks: What Actually Works
Distributed servers that hold copies of your content close to the people requesting it.
Why does it matter?
Distance costs latency that no amount of application optimization recovers, and a CDN is usually the largest single improvement available to a geographically spread audience.
What are the numbers?
- Benefit reduced latency, offloaded origin traffic and often DDoS protection
- Cache control governed by origin headers unless overridden
- Invalidation purging, which varies in speed between providers
- Dynamic content can be cached carefully, or passed through
- Risk caching personalised responses at the edge
What should I do?
- Set cache headers deliberately at the origin
- Never cache personalised responses at a shared edge
- Know how to purge, and test it before you need it
- Serve images and static assets through the CDN
- Monitor cache hit ratio as a health measure
What should I avoid?
Avoid:
- Caching authenticated responses
- Relying on the CDN default configuration
- Purging everything as the routine fix
- Adding a CDN without adjusting origin cache headers
When should I get help?
Short answer Bring in help when personalised content has been cached publicly, when cache behavior is not understood, or when a CDN must be introduced to a live site.
Where this comes from
- Cloudflare Learning Center — CDN fundamentals
- MDN Web Docs — HTTP caching
- web.dev — Content delivery networks
The figures and practices above come from the sources listed.
Working on something like this?
We take on Performance & Accessibility work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.
Where to go next
Spotted something wrong? Report an error on this page. We correct on the page and say what changed.