https://www.cloudflare.com/learning/cdn/what-is-a-cdn/
A CDN is a geographically distributed network of servers where the goal is to deliver content as fast as possible by using edges that are the closest to the client. CDN’s store cached static files.
For a website hosted on a server in Nevada, if a user in Tokyo accesses the website, instead of requesting the server in Nevada, if someone else in East Asia had accessed the website before hand, the user can get cached static files (JS, CSS, static media, API responses) from the closest CDN edge (which can be a cloud flare data center in Japan for the cloud flare CDN).
Pull CDN
- Requests content from the origin server when a particular users requests it. The contents are stored at the server of the CDN and served from the cache until expiry
- Content is not pre-distributed since it arrives at an edge on request
- This is what I think of when I think of a CDN
Push CDN
- The content owner needs to manually initiate content delivery to the CDN
- Content is pre-distributed by the CDN so this is a lower latency solution and is better for static content
- This is more complex