How Hotstar handle the 35M concurrent users - Devops Perspective.

How Hotstar handle the 35M concurrent users - Devops Perspective.

ยท

3 min read

Hotstar is a popular Indian ๐Ÿ‡ฎ๐Ÿ‡ณ digital and mobile entertainment platform ๐Ÿ“บ. It offers a wide range of digital media content, including TV shows, movies ๐ŸŽฌ, and sports events (such as cricket matches ๐Ÿ from the Indian Premier League and other sports tournaments).

Have you ever checked in live cricket ๐Ÿ matches ๐Ÿ“บ, there is a count on top, like 67L Viewers ๐Ÿ“ˆ.

Have you ever wondered how Hotstar handles this huge traffic? ๐Ÿ“ˆ

In 2019, During the ICC World Cup Semi-Final between India and New Zealand ๐Ÿ, Hotstar set a new record of 25.3 million viewers. Similarly, Hotstar set a new record of 35M concurrent users during the recent IND vs PAK World Cup 2023. That was a huge count.

Challenges faced by Hotstar

In 2019 when Dhoni came for batting ๐Ÿ sudden spike ๐Ÿ“ˆ was noticed in traffic, taking it to 25.3M concurrent users. But then Dhoni got out, and there was a drastic drop ๐Ÿ“‰ from 25.3M to less than 1M.

There is first challenge is to handle such sudden spikes ๐Ÿ“ˆ and drops ๐Ÿ“‰ also when users are dropped, some of them exit from the app entirely and others return to the homepage. that leads to an increase in load on homepage services.

-> Challenges with autoscaling.

-> Load testing for millions.

-> Chaos engineering at a high level.

How did Hotstar overcome these challenges?

โ€ข Autoscaling: Hotstar does not use traditional autoscaling from AWS because it comes with challenges ๐Ÿงฑ, such as insufficient capacity errors โŒ, single instance type per auto-scaling group, and step size autoscaling groups. Instead of this Hotstar uses custom scaling policies that are traffic-based ๐Ÿšฆ and ladder based ๐Ÿชœ. It allowed automated pro-active scale-up buffers to handle the sudden spikes ๐Ÿ“ˆ.

โ€ข Load testing: For load testing, Hotstar has project HULK. Project HULK is an in-house performance ๐Ÿ‹๏ธ testing framework developed by Disney+ Hotstar. It allows Hotstar's engineers โš™๏ธ to simulate the entire user journey with different inputs and can also simulate entire traffic patterns. This helps them to identify ๐Ÿ”ฌand fix potential bottlenecks and performance issues before they affect real users.

โ€ข Content delivery network ๐ŸŒ: Hotstar uses a CDN ๐ŸŒ to deliver content to users from servers that are located close to them ๐Ÿ“ก. This helps to reduce latency and improve the streaming experience for users.

โ€ข Chaos Engineering ๐Ÿ› ๏ธ: Chaos Engineering ๐Ÿ› ๏ธ can be used to identify ๐Ÿ” and mitigate single points of failure in Hotstar's system ๐Ÿ–ฅ๏ธ. By using Chaos Engineering to test the system's ability to handle these different types of failures.

Panic Mode ๐Ÿ”ด:

Hotstar uses panic mode when it experiences a major outage or disruption. It turns off ๐Ÿšซ non-critical services and graceful degradation, P0 services must be always up.

ย