~learn.
0:00 / 1:42
Case file · Hotstar

A million new viewers a minute. Servers took six to start.

transcript

25 point 3 million people. One cricket match. One live stream. Hotstar's servers had to be running before the crowd showed up. Why?

The standard answer is autoscaling. CPU over 70 percent? Add servers. But a thermostat reacts after the room is already hot. Then the cloud boots a machine. The app starts. It joins the load balancer. Hotstar's cloud architect put that chain at five to six minutes.

During the chase, about a million new viewers arrived every minute. Times five or six minutes of waiting for each server. 5 to 6 million people arrive before the help does.

Hotstar's CTO at the time put it this way. Do you order food as guests start arriving? I hope you don't. We don't either.

So before the match, they pre-warm everything to the predicted level. Then they climb a ladder. So many viewers, so many servers. Not CPU. Headroom running out? Decide in about 90 seconds, and step up.

But here's the cricket twist. Dhoni about to bat? 2 or 3 million more viewers. A push notification goes to 150 to 200 million people. 2 to 4 percent tap. That's 4 to 6 million extra, in a very short span. So keep that headroom spare.

Traffic grows faster than servers start? Reactive autoscaling is always late. Scale on what predicts the crowd. Then order the food before the guests arrive.

Full breakdown in the lecture.