11. Classic design problemsVideo streaming
Video streaming
A video streaming system like YouTube or Netflix takes uploaded videos and plays them smoothly on millions of devices over very uneven connections. After upload, each video is transcoded into several quality levels and cut into short chunks of a few seconds, and those chunks are served from a CDN, a network of caches close to viewers. The player uses adaptive bitrate streaming: it watches how fast chunks are arriving and how much video is buffered, then picks the quality of the next chunk, dropping to a lower resolution rather than stalling when your Wi-Fi weakens. The interesting trade-offs are chunk length, storage cost of many versions, and keeping popular content warm in the caches.
In this lesson: An adaptive-bitrate sim with a bandwidth slider.