HLDbeginner
CDN and Edge Caching
A CDN reduces latency and origin load by serving cacheable content from locations closer to users. It is one of the highest-leverage improvements for globally distributed products.
Reading time
10 min
cdnedgelatencycaching
What a CDN Solves
If every asset is served from one origin region, distant users pay unnecessary latency. A CDN caches content at edge locations close to the user.
Typical Use Cases
- Images and videos
- JS/CSS bundles
- Downloads
- Public API responses with short TTLs
Important Concepts
- Cache-control headers
- Purge and invalidation
- Origin shielding
- Signed URLs
Interview Tip
Mention CDN early for globally distributed media or web products.