As asked
Design a CDN for a video streaming service that must serve 4K video to 50 million concurrent users globally with p99 latency under 100ms for the first segment. Walk me through PoP placement, origin pull strategy, cache hierarchy, and how you handle a viral video that was not pre-warmed.
Sample answer outline
PoPs placed in major IXPs and ISP networks on every continent, selected by anycast BGP or DNS GeoDNS. Two-tier cache: edge PoPs cache popular content, mid-tier (shield) PoPs cache the long tail and protect origin. Origin pull on cache miss uses HTTP Range requests to stream the specific byte range needed. Viral video: shield PoPs absorb the stampede; at the edge, use request coalescing (collapse simultaneous cache misses for the same object into one origin fetch) and pre-push critical manifests. Signed URLs and token auth prevent hotlinking. Monitor cache hit rate per PoP and auto-scale origin.
Expect these follow-ups
- How would you handle adaptive bitrate (ABR) streaming where clients switch between quality levels?
- What is the thundering herd problem at the CDN cache level and how do you prevent it?