Thanks again, love your channel. If and when you get a chance, suggestion for next system design 1). distributed message queue and 2). distributed cache.. Thanks for all your hard work
Shouldn't there be multiple transcoded video URL's for a single video? like for each video format i.e. mp4, mvi e.t.c we should support multiple resolutions like 720p, 360p e.t.c, right? However, as per your metadata DB design, I see only a single column? Do you add multiple rows for each video wherein each row has a separate transcoded video URL for each bitrate + format? If that is the case, then writes will also be huge, so having a wide columnar DB like Cassandra would make more sense than MySQL, is what I feel. What say?
Hi! That's a really good point. I totally agree that we will need to support multiple resolutions and formats. I thing a relational table would still work given the write throughput won't be too high. Transcoding will mostly occur on video upload time. We can always shard our relational table based on video_id or something if it's getting too large. Cassandra would also work here, but I think a simple MySQL table would do the job too.
Thanks for the great videos! I've got a question about the Transcoding Service. It seems like its only job is upon receiving S3 URL of an original video to publish a message to Kafka. If so, why don't API servers publish messages to Kafka directly and everything else stays the same ? It's not an expensive process from what I understand. Is there something else I don't get ?
How does server know what all ids need to be saved against the user? In the facebook we know friends and that helps in storing the newsfeed for the users. Here in this design, if someone uploads the video, how do we know this video id should be also stored for other users?
You can use concepts from the Facebook design. The RU-vid equivalent of "Friends" is subscribers. So you can push videos to the subscribers "feed" whenever a channel they follow uploads a video.
For the notes, I recovered several of them. If you want them, please subscribe to irtiza.io. I am using that list to keep track of whoever wants the notes now and moving forward.
Hi, great video, just wanted to add that we should break the video into chunks before sending it to the transcoding service so that the transcoding workers can work in parallel for different chunks.
Unfortunately, most of the PDF links expired. You can consider subscribing to my newsletter at irtiza.io. Soon I will send out the ones I could recover.