aoitcloud

Guides and How Tos

What Is a CDN and How It Actually Works

A content delivery network moves your content closer to visitors using a global network of edge servers. Here's the mechanics behind that, in plain terms.

9 September 2026 4 min read

A Content Delivery Network, usually shortened to CDN, is a network of servers spread across many physical locations that store copies of a website’s content closer to the people requesting it. The idea behind it is straightforward: the further data has to physically travel, the longer it takes to arrive, so put copies of it in more places.

The basic idea: distance costs time

Without a CDN, every visitor’s request travels all the way to wherever your origin server physically sits, wherever that data centre happens to be, and the response travels all the way back. A visitor in Sydney requesting a page from a server in London is going to experience noticeably more latency than a visitor in Manchester requesting the same page. A CDN works around this by keeping cached copies of content on servers, often called edge servers or points of presence (PoPs), positioned in data centres around the world. A nearby edge server can answer that Sydney visitor’s request without the round trip to London at all.

How a visitor actually reaches the nearest edge server

Getting a visitor to the closest available edge server, rather than a random or distant one, relies mainly on two mechanisms working together, DNS-based routing and anycast.

DNS-based routing

When a browser looks up a domain that’s on a CDN, the CDN’s DNS system can return a different answer depending on where the request appears to come from, directing the visitor towards a nearby regional point of presence rather than always returning the same fixed address.

Anycast routing

Many CDNs also use anycast, a networking technique where the exact same IP address is announced simultaneously from multiple data centres around the world using the internet’s routing protocol, BGP. Ordinary internet routers, which are already constantly exchanging information about the shortest paths between networks, then naturally send a visitor’s traffic to whichever announcing location is topologically closest to them, without the visitor or their browser needing to know that more than one location even exists. If one location goes offline, it simply stops announcing that address, and traffic is automatically routed to the next nearest location instead.

In combination, DNS routing typically narrows things down to a broad region, and anycast (or similar routing logic within that region) picks the best specific edge node from there.

What a CDN can cache, and what it can’t

Not everything a website serves is suited to caching at the edge. The general rule is that content needs to be the same for everyone (or at least for a well-defined group of visitors) to be worth caching.

  • Typically cacheable: images, CSS and JavaScript files, fonts, videos, and static HTML pages that don’t change per visitor.
  • Typically not cacheable, or only cacheable with care: logged-in account pages, shopping basket contents, personalised recommendations, and anything containing session-specific or private data.

For that second category, requests still need to reach the origin server, though a CDN sitting in front can still help by handling the TLS connection closer to the visitor and by protecting the origin from excess traffic before the request is even passed through.

The practical benefits

  1. Lower latency: content is served from a location physically closer to the visitor, so it arrives faster.
  2. Reduced load on the origin server: cached requests are answered at the edge and never reach your actual hosting server at all, freeing up its capacity for the requests that do need it.
  3. Some absorption of DDoS traffic: a large, distributed network of edge servers can absorb and filter a considerable amount of malicious or excessive traffic before it ever gets close to the origin, spreading the load across many locations rather than concentrating it on one server.

Summary

A CDN is, at its core, a large network of servers holding cached copies of your content in many physical locations, combined with routing mechanisms (DNS-based routing and anycast) that get each visitor to the nearest one automatically. It works best for static, shareable content like images, stylesheets and scripts, and less well for dynamic or personalised pages that need to hit your origin server anyway. The main benefits are faster load times for visitors, less load on your origin server, and a meaningful degree of protection against traffic spikes and DDoS attacks.

Get in touch

Drop our team a message today