CDNs are critical for media delivery:
How they work:
- Content cached at edge servers worldwide
- User request routed to nearest edge
- Cache miss fetches from origin, then caches
Routing strategies:
- DNS-based: Return IP of nearest edge
- Anycast: Same IP, network routes to closest
- HTTP redirect: to optimal edge URL
Cache hierarchy: Edge → Regional → Origin. Reduces origin load.
Cache invalidation: TTL-based or explicit purge. Trade-off between freshness and cache hit rate.
Multi-CDN: Large platforms use multiple CDNs. Route based on performance, cost, and availability.