Disney + Hotstar System Design for 43 Million Concurrent Users for India Vs NZ CWC 2023
How does it handle so much load?
๐ Sending Video streams to the AWS Data centers
๐ธStep #1 Ingestion
Ingestion involves converting RTMP streams into one-second chunks for multiple bitrates, and playback involves serving these chunks to users. These are essential components of a streaming service. Multiple cameras at the stadium transfer video streams via Real-Time Messaging Protocol to the servers at AWS data centers where transcoding is performed.
๐ธStep#2 Transcoder Server
It is the process of converting a video file from one encoding format to another in order to increase the number of compatible target devices a media file can be played on.
๐ Users requesting videos to watch the match
Playback:
When a viewer wants to watch the stream, their player connects to a distribution server. The distribution server sends the viewer the video chunks in the order they need to be played.
This causes the โ๐ญ๐ก๐ฎ๐ง๐๐๐ซ๐ข๐ง๐ ๐ก๐๐ซ๐โ problem: In a high-stake event like India vs Pakistan or New Zealand, traffic can surge dramatically at specific moments. If too many viewers connect to the distribution servers at the same time, it can overwhelm the system and cause lag, dropouts, and disconnections.
How CDNs help:
A content delivery network (CDN) can help to solve the โthundering herdโ problem by caching the video content closer to the viewers. This means that viewers can request the video content from a CDN edge server, which is much faster than requesting it from the distribution server.
How CDNs work:
When a viewer connects to a CDN edge server, the edge server checks to see if it has the video content in its cache. If it does, the edge server serves the content directly to the viewer. If the edge server doesnโt have the content in its cache, it requests it from the distribution server. Once the edge server has the content, it can serve it to other viewers who request it.
Benefits of using a CDN:
CDNs provide a number of benefits for live streaming services, including:
๐ Reduced latency: Viewers can start watching the stream sooner because they are getting the content from a server that is closer to them.
Improved reliability: CDNs have a global network of servers, so if one server goes down, the stream can still be delivered from other servers.
๐ Reduced costs: CDNs can help to reduce the costs of live streaming by offloading some of the traffic from the distribution servers.
๐ Improved scalability: CDNs can help to improve the scalability of live streaming services by distributing the load across a large number of servers.
๐๐จ๐ง๐๐ฅ๐ฎ๐ฌ๐ข๐จ๐ง
CDNs are an essential part of all streaming services, without which they canโt operate.
Happy Coding!!