In dropbox design, we split large files into chunks so that it is easy to cache as well as less load on servers. Why doesn’t youtube design involve similar concept?
If we split videos to chunks and store chunks on server based on hash of chunk ids, wouldn’t it be better? Would it be wrong if we decide to go with this approach in an interview?
Hi Anup! yes, you are very right. Youtube does use the concept of chunks while uploading and playing a youtube video. It fetches chunks of video files from different servers (preferably from a server locating closest to the system) while playing the video, which they call as “Sliced bread”. Similarly, while uploading the video, Youtube uses the concept of “Codec (Compress and Decompress)” which makes compress the size of of a video into multiple pixel formats (144p, 240p, etc.) and save each video in form of chunks.
So, both of the techniques “Sliced Bread” and “Codec” work on the principle of making chunks of a single video file.
You can see the following videos for your reference:
Does netflix/youtube/ott platform upload videos in chunks or as a whole file?
If chunk then how and who does the chunking at the client-side?
If the whole file, then does resume happen in case of network/transmission failure? if yes then how?