
System Design: How YouTube Knows Where to Resume
If your Wi-Fi drops while uploading a massive 20GB video, YouTube doesn't force you to restart from zero. While basic network protocols like TCP retransmit lost packets during an active stream, a total disconnect wipes that connection memory completely. To solve this, YouTube creates a dedicated upload session with a unique URL before any video data is sent, tracking every saved byte directly on its servers.
When your connection drops around 14GB, your computer and YouTube actually disagree on the exact progress because data still traveling through the network was lost. Since the server is the single source of truth, your browser reconnects to that session URL and asks how many bytes were safely stored. YouTube reports the exact byte offset, allowing your laptop to stream only the remaining data from that exact spot without re-uploading a single wasted byte.
#SystemDesign #YouTube #SoftwareEngineering #TechExplained #WebDevelopment #CodingForBeginners
When your connection drops around 14GB, your computer and YouTube actually disagree on the exact progress because data still traveling through the network was lost. Since the server is the single source of truth, your browser reconnects to that session URL and asks how many bytes were safely stored. YouTube reports the exact byte offset, allowing your laptop to stream only the remaining data from that exact spot without re-uploading a single wasted byte.
#SystemDesign #YouTube #SoftwareEngineering #TechExplained #WebDevelopment #CodingForBeginners
KodeKloud
...