Extreme Engineering! @Hotstar – IPL 2018
The statement “Hotstar consumes more than 50% of India’s internet during IPL” is a powerful enough statement to give goosebump to any engineer/technology enthusiast. This is the very same statement which got me into working with Hotstar for IPL 2018. IPL is an event which is hosted in India but it is a mega-event globally, and India is a country where cricket runs through the blood of every kid in every ally. Every Indian would have played some or the other form of Cricket in their life. Catering such an audience means working on the extreme technology.
Video streaming is not new. Everyone is doing it! So why is Hotstar’s scenario so important?
What everyone else is doing is streaming videos on demand, when you get into live streaming everything changes. And when millions of people are consuming the same stream at the same time it becomes even more complex problem. The video is one part of the equation. There are many more services involved with video to cater a user as a platform. Making those services work at the order of 10 ms response time is tough!
Unpredictability in the game!
Sports is a thrilling genre because you don’t know what can happen next. Dhoni might hit 4 sixes, or Virat may get out very next moment. These events make the game more interesting. which leads to surges in traffic, which is hard to predict so we have to design our services to work under worst condition. So now when we are talking about x million users, we have to plan for 2x million users coming in at same time.
While the designing system for this scale we touched the limits of all the possible available services. Be it MySql, Redis, Kafka, etc. We have to work with designers of these services to see how we can scale it to our requirement. Achieving a highly resilient system needs a testing system to that scale and breaking it. But testing for millions is not possible from one box. We explored multiple load testing tools and settled for flood.io, which scaled as we needed it to scaled. Our load generators in itself would generate more than 10 Gbps of outbound traffic. Now that’s extreme for me at least! You also have to deal with security because when you are going with all protection, there are many who would try to cheat your system.
Working under the timer
The fun and the thrilling part about working for Hotstar and IPL is that there is timer clicking every second. Whether you are ready or not the game will start. This means that you have to think differently. This involves more of tactical thinking than strategic thinking. A strategy needs time to implement. Tactics can be applied then and there. After a long time, I got a chance to work under this setup. It reminded me of my college fest days, where the event will begin irrespective of you are ready or not!
I am really fortunate to have an opportunity to work at such a scale. Thanks, Akash (Head of Technology, Hotstar) for giving me this opportunity!