CDNs have server placed in datacenters all around the world in servers called edge locations (ie server all over the world).
A CDN is just a packet routing system for the Internet that automatically routes HTTP requests for a website to the nearest edge location (cache) server. See implementation for the available technology
A publishing site with 5000 pages of text and image by day will use around 5GB/month.
Typically a VPS comes with 1TB of bandwith.
- https://www.jsdelivr.com/ - A free CDN for Open Source
# github example https://cdn.jsdelivr.net/gh/name/repo@release/file.js
- https://www.cdn77.com/ (0.045 / GB) - Winscp use them
To route a request from a name to the nearest server, there is basically two technology:
- Network - IP Anycast - complicated
To sync, you can use file sync technology such as rsync.
See also this infographic from Jsdeliver