What a CDN does
A content delivery network is a fleet of servers spread around the world. It stores copies of your content at the edge, close to users, so requests do not have to travel back to your origin.
The two wins
- Lower latency because content is served from a nearby city.
- Origin offload because the CDN answers most requests, so your servers handle far fewer.
What to put on it
- Static assets like images, scripts, and styles.
- Cacheable API responses that change slowly.
- Large downloads and video segments.
Each item carries a time to live that says how long the edge may serve it before checking the origin again.
Most requests stop at the edge, and only misses reach the origin, which is why a CDN can absorb huge traffic spikes cheaply.
Key idea
Serve cacheable content from edge servers so users get speed and your origin sheds load.