How CDN works
When your content is stored on a CDN, it is distributed across the network’s servers, and the content is delivered from the optimum location for that user. The CDN uses an algorithm to determine whether the best location is:
- the server from which it will take the fewest hops to deliver the content
- the server whose distance is the least number of network seconds from the requesting client
- the server with the highest availability in terms of server performance.
Some techniques that a CDN will employ include:
Caching – the CDN will store popular content on servers that have the greatest demand for that content.
Load balancing – traffic is shared over multiple servers or web caches.
Request routing – directs client requests to the content source best able to serve the request. This could be the closest node, or the one with the greatest capacity.