Codele / System design
Content delivery networks
A picture on a server far away takes a long trip to reach you. A content delivery network keeps copies in cities near the people who want them.
- A CDN is a network of helper computers (edges) in many cities, each keeping copies of your files.
- Distance costs time. A visitor reads from the nearest edge instead of one far-away server.
- The first request is a miss: the edge fetches the file from your server and keeps a copy.
- Later requests are hits: the edge answers alone, fast, and your server does less work.
- It suits files that rarely change (pictures, videos, page files). When a file changes, old copies must be refreshed.
Loading the playable lesson…