Apparently I’m preparing for SD interview. I came across this question and wonder how videos are stored on distributed file system. Is a file broken into chunks and stored? If so, can a media player play chunk by chunk in serial without combining the chunks? TC 200 Yoe 5 #faang #interview
Yes, it is stored in chunks. Whenever, you play a video, youtube continues to download these chunks sequentially in the background while the video is playing. The chunks are kinda independent of each other. There are no issues as long as the media player has unconsumed data. If you skip forward, then the appropriate chunk is downloaded and all the previous chunks are skipped. There are a lot of sources available for video streaming services on the net.
The key insight interviewers love is that netflix is actually 1000x easier to run than youtube. They simply need to push their hyper curated library to each regional CDN which solves 99% of problems. YouTube is uniquely difficult in that it has no curated content. Anyone can watch anything at any time uploaded from anyone? CDNs need to dynically populate instead. A fun point ot make is that I'd you can alter the recommendation system to favor locally cahced content, you can make massive gains in total system load
Yes, and the content can grow much faster as well. Thanks for the fun point. I’ve never thought of that before.
I think the concept is adaptive bit rate streaming?
I will have to learn about it. I lack of knowledge of how streaming being done at low level.
I’m just a product manager but you should understand codecs, transcoding, streaming tech like HLS or DASH, think about CDNs, subtitles, storage, media regions, control plane regions, and more
Thanks for sharing these concepts. I know some of these at high level will definitely look up what I don’t know yet.