Tech, ExplainedGaming, streaming and media
Part

Live streaming at scale

Tens of millions join for the final over.

INSIDE: STREAMING SERVICE (OTT)HOW IT WORKS · A TOURNAMENT FINAL'S LAST FIVE OVERSServers for 5crore viewersare added hoursbefore the matchAt the toss,1.8 crore peopleare watchingIn the last fiveovers, viewersrise to 4.5crore within12 minutesLogin serversreach 90% oftheir capacityThe teamswitches off thepersonalisedhome screen fornew viewersNew viewersgo straightto the match,and the videokeeps playingALSO TALKS TOContent delivery network (CDN)↗ CLOUD HOSTINGVideo encoding and transcodingVideo quality of experience (QoE) analyticsINSIDE: STREAMING SERVICE (OTT)HOW IT WORKS · A TOURNAMENTFINAL'S LAST FIVE OVERSServers for 5 croreviewers are added hoursbefore the matchAt the toss, 1.8 crorepeople are watchingIn the last five overs,viewers rise to 4.5 crorewithin 12 minutesLogin servers reach 90%of their capacityThe team switches off thepersonalised home screenfor new viewersNew viewers go straightto the match, and thevideo keeps playingALSO TALKS TOContent deliverynetwork (CDN)↗ CLOUD HOSTINGVideo encodingand transcodingVideo quality of experience(QoE) analyticsINSIDE: STREAMING SERVICE (OTT) · A TOURNAMENTFINAL'S LAST FIVE OVERSServers for 5 crore viewers are addedhours before the match↓At the toss, 1.8 crorepeople are watching↓In the last five overs, viewers rise to4.5 crore within 12 minutes↓Login servers reach 90% of their capacity↓The team switches off the personalisedhome screen for new viewers↓New viewers go straight to the match, andthe video keeps playingALSO TALKS TOContent delivery network (CDN)↗ CLOUD HOSTINGVideo encoding and transcodingVideo quality ofexperience (QoE) analytics
A tournament final whose audience rises from 1.8 crore to 4.5 crore in twelve minutes, kept playing by servers prepared in advance and a personalised home screen switched off for new viewers.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

Live streaming at scale is the work of keeping a live event, such as a cricket final, playing smoothly for tens of millions of people who watch at the same moment. It is the hardest job a streaming service has. A film can be prepared days in advance and stored near every viewer. A live match must be compressed, packaged and delivered within seconds of each ball, to everyone at once.

Why is live harder? The number of viewers does not grow slowly. It jumps. Viewers join at the toss, leave at the innings break and come back in a rush for the last overs. Each new viewer's app must log in, check the subscription, load the home screen and start the video, all within a few seconds. If crores of apps do this in the same minute, the servers that handle logins and subscriptions can fail even when the video itself is fine. The page on high concurrency explains this problem.

Engineers prepare for this in several ways. They add servers hours before the match, because adding them automatically during a surge is too slow. They spread the video across several content delivery networks (CDNs), so that no single company carries all the traffic. They run a live video encoder that makes six or seven copies of the match at different qualities, for adaptive bitrate streaming. And they plan what to switch off in an emergency. If the servers are overloaded, the app stops showing recommendations and comments, and keeps only the video. This plan is often called graceful degradation.

Imagine the final of a tournament. At the toss, 1.8 crore people are watching. During the last five overs, the figure rises to 4.5 crore within twelve minutes. The service had prepared servers for 5 crore. Even so, the login servers reach 90% of their capacity. The operations team switches off the personalised home screen for new viewers, so that each new viewer goes straight to the match. The video keeps playing. The team watches the whole event on video quality of experience analytics, which shows within seconds where viewers are waiting or freezing.

A live stream also arrives a little late. A streamed match is usually several seconds behind live television, because the video is cut into short pieces and each piece must be ready before it is sent. Services try to reduce this delay, called latency, so that viewers do not hear a neighbour cheer a wicket before they see it.

This part belongs to a streaming service. The audiences are so large in India because of live cricket.

Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.