Content Delivery Network, or CDN, is a network of distributed servers that provide web content to end-users.
CDNs use multiple servers across different locations worldwide to improve the speed at which content is delivered to local users.
They also help to offload traffic from the origin server of the content provider.
The content requests are automatically routed to the closest servers, which speeds up the loading of pages and maximises bandwidth.
How is this decision made?
The automatic process of routing to the closest servers is typically done algorithmically, typically directing to the node that is optimal.
This decision can be made by choosing a location that is the least number of network seconds away from the client, or has the highest availability for server performance. This helps to optimise delivery across local networks.
Cost can also be a factor when deciding location, with the least expensive sometimes chosen instead of the closest. Often these two goals align.