LeetDesign
← All problems
Hard

Design Video Streaming Delivery

A petabyte catalog behind an edge that eats 95% of a premiere-night flood. The CDN is table stakes — the engineering is the 5% that leaks through, and the origin fleet it lands on.

Design the delivery path for a video streaming service. Players fetch a manifest, then pull two-second video segments one after another for hours; a transcode pipeline publishes new segments as titles are ingested.

The catalog is a petabyte and a premiere night peaks in the hundreds of thousands of segment reads per second — numbers that disqualify whole categories of design before you place a box (the image-hosting problem already taught that half). Segments are immutable once published, so 95% of reads are cacheable and the edge will do most of the serving. That part is a given.

The actual engineering is arithmetic on what the edge does NOT absorb. Five percent of a premiere flood is still tens of thousands of reads per second, it all lands on whatever you call an origin, and origin storage serves blobs slowly. Size that fleet for a normal evening and the premiere will find you; size it for the premiere and the bill barely moves — which is its own lesson about where the money in a CDN system actually lives.