← All articles

Infrastructure

What a CDN actually does

2026-07-05 · 5 min read

Data moves fast, but not infinitely fast — a request from Sydney to a server in Virginia has to physically cross the planet and back, and that round trip costs real milliseconds you can feel. A Content Delivery Network (CDN) fixes this with a simple trick: keep copies of your content in lots of places, and serve each visitor from the one nearest them.

Distance is latency

Every request is a round trip, and distance sets a floor on how fast it can be — no amount of server tuning beats the speed of light. Ship a page halfway around the world and you've spent a few hundred milliseconds before your server even does anything. Multiply that by every image, script, and stylesheet on the page and "far away" becomes "slow."

Serving from a nearby edge versus a distant origin You Sydney Edge nearby, cached Origin far away ~20 ms only on a cache miss without a CDN: one long trip to origin (~300 ms)
The edge server, close to the user, answers most requests in milliseconds — and only reaches back to the distant origin when it doesn't already have the file.

Edge servers and cache hits

A CDN runs hundreds of edge servers spread across the globe. The first time someone in a region requests your logo, the nearby edge fetches it once from your origin and keeps a copy. Every request after that is a cache hit — served straight from the edge, close by and fast, never touching your origin. Your server goes from answering millions of requests to answering the handful the edges couldn't.

The gist

Instead of everyone travelling to your one server, the CDN keeps copies of your stuff all over the world and serves each visitor from the closest one.

What you get for it

  • Speed everywhere — visitors are served locally, so the site feels fast regardless of where your origin lives.
  • A shield for your origin — the edges absorb the vast majority of traffic (and soak up a lot of malicious floods, too).
  • Resilience — if one edge or region has trouble, requests route to another.

It's cleanest for static assets — images, CSS, JS, fonts — which is exactly what a site like this is made of. Sit a CDN in front of a static site and you've globally distributed it for pennies. The caveat is the flip side of caching: when you change a file you may need to tell the CDN to refresh, or version the URL — the same cache-busting trick browsers make you learn with favicons.


CDNPerformanceInfrastructureCaching
← Back to the blog