Stealing strategies from Nature!

The most stable programming framework out there is Evolution. And one of its special modes is stress (gets activated when we perceive danger). Our body has a list of all running processes and their importance. During stress, our body will immediately route all power to the brain (to get clarity on the situation), activate our muscles (to get in motion if required). It kills all the secondary operations like food digestion (who need power if you don't survive), pain receptors.

Photo by Suzanne D. Williams / Unsplash

The same can be applied to solve scale problems in the software. When millions of people stream T20 on Hotstar, it is by definition under stress. Hotstar engineers took inspiration from evolution and designed the system in the same way. Kill all the processes that are secondary. Go into survival mode.

During the immediate spike, Hotstar stop all secondary processes like recommendation engine, personalized homepage, any secondary process that is a power hog.

They focus on a single primary feature i.e. streaming match without buffering.

Next time you face a problem, look for domains where it's already solved for inspiration before jumping to Stackoverflow :)