Uploaded October 2026 | Updated November 2026, 2 days ago
Your neighbour screams "SIX!", and you see the ball a few seconds later. Why? And how does one camera feed reach millions of phones without buffering?
When a match is streamed live, one camera feed has to reach millions of phones, every second, without buffering. How does that work?
Step 1, encode: the live feed goes into an encoder that makes several copies at once: 240p, 480p, 720p, 1080p. A ladder of qualities.
Step 2, segments: each copy is chopped into small chunks of a few seconds, plus a playlist that keeps pointing to the newest chunk. That's how HLS and DASH work.
Step 3, edge: the chunks go out to a CDN, thousands of edge servers in cities close to the viewers. Your phone downloads from the nearest edge, not from the origin. A million viewers asking for the same chunk is a million cache hits.
Step 4, adapt: the player keeps watching your network. Speed drops in the metro? It switches to lower-quality chunks for a while, instead of buffering. That's adaptive bitrate.
That's also why live is always a few seconds behind: your neighbour cheers the six, and you see that ball a few seconds later.
The video scales well. What breaks is everything around it: login, the home page, the scorecard, the ads. That's where autoscaling comes in, and three things make it hard for live events:
- 1. It's late: it waits for CPU to rise, then new servers take minutes. A toss or a last over brings millions in seconds. Scale ahead, on a schedule and a forecast from past matches
- 2. The right signal: CPU lags behind. Scale on concurrent viewers and requests per second
- 3. Don't scale down too fast: viewers leave at the innings break and all come back together. Keep a cool-down and some headroom
Next: in today's System Design Interview reel, Hotstar for an IPL final. Comment and tell me: has your stream ever frozen on the most important ball? Follow for the full series.
kgptalkie.com
#shorts #SystemDesign #LiveStreaming #CDN #AdaptiveBitrate #Autoscaling #HLS #VideoStreaming #Scalability #BackendEngineering #SoftwareEngineering #KGPTalkie
Your neighbour screams "SIX!", and you see the ball a few seconds later. Why? And how does one camera feed reach millions of phones without buffering?
When a match is streamed live, one camera feed has to reach millions of phones, every second, without buffering. How does that work?
Step 1, encode: the live feed goes into an encoder that makes several copies at once: 240p, 480p, 720p, 1080p. A ladder of qualities.
Step 2, segments: each copy is chopped into small chunks of a few seconds, plus a playlist that keeps pointing to the newest chunk. That's how HLS and DASH work.
Step 3, edge: the chunks go out to a CDN, thousands of edge servers in cities close to the viewers. Your phone downloads from the nearest edge, not from the origin. A million viewers asking for the same chunk is a million cache hits.
Step 4, adapt: the player keeps watching your network. Speed drops in the metro? It switches to lower-quality chunks for a while, instead of buffering. That's adaptive bitrate.
That's also why live is always a few seconds behind: your neighbour cheers the six, and you see that ball a few seconds later.
The video scales well. What breaks is everything around it: login, the home page, the scorecard, the ads. That's where autoscaling comes in, and three things make it hard for live events:
- 1. It's late: it waits for CPU to rise, then new servers take minutes. A toss or a last over brings millions in seconds. Scale ahead, on a schedule and a forecast from past matches
- 2. The right signal: CPU lags behind. Scale on concurrent viewers and requests per second
- 3. Don't scale down too fast: viewers leave at the innings break and all come back together. Keep a cool-down and some headroom
Next: in today's System Design Interview reel, Hotstar for an IPL final. Comment and tell me: has your stream ever frozen on the most important ball? Follow for the full series.
kgptalkie.com
#shorts #SystemDesign #LiveStreaming #CDN #AdaptiveBitrate #Autoscaling #HLS #VideoStreaming #Scalability #BackendEngineering #SoftwareEngineering #KGPTalkie










