As Twitch continues to grow and get more viewers and content creators every day, the team working on the platform has been looking for ways to support this growth from a technological point of view. The number one question that needed to be solved — how to meet the requirements of the platform and reduce operational costs at the same time by using networking and computation resources?
Points of presence in the infrastructure of Twitch
Ensuring low latency and high-quality of streams on Twitch has been an important goal for Twitch developers. To achieve this, the platform relies on a hundred PoPs (points of presence), which are located in different parts of the world. The way the system works is that streams are received at these PoPs and then they send information to the main data centers where they are being processed.
There are origin data centers all across the world to ensure the highest quality of streams for the global community. With the help of the backbone network, the system ensures QoS experience for everyone, low latency, and also high availability. Thanks to this system, the instability is minimized even when the public Internet is used.
If you are interested in Twitch, you can learn more not only about its system but also how you can promote your channel and ensure its quick growth by visiting StreamSkill.
What about the challenges of this system?
With the expansion of the platform, the developers discovered some problems with the use of the infrastructure:
- The first issue was the fact that PoP ran HAProxy, which caused ineffective use of the network and compute resources. At some moments, origins experienced full load during particularly busy hours while at other times their use was minimal.
- HAProxy configuration is quite static, which means that it’s not well-suited for handling fluctuations in the system and sudden surges of traffic.
- High volatility of the ingest traffic demand because of different popular events caused difficulty with HAProxy configuration.
- HAProxy is not suitable for dealing with serious issues, such as a control plane outage and other problems with an origin.
Intelligest as a solution to the mentioned problems
As you can see, the previous system had a number of challenges than had to be overcome. To provide improved support for the live video traffic developers decided to completely remove HAProxy from the equation. Just recently, Twitch presented Intelligest, which is a system that ensures intelligent distribution of live video traffic from the points of presence to the origins.
The main two components of Intelligest include Routing Service that runs in AWS and also media proxy that runs in every PoP. When it comes to Intelligest media proxy, this component works as the gateway to the infrastructure of Twitch. This media proxy decides where streams should be sent and it is also responsible to terminating video streams.
When it comes to the routing service, its purpose is to make routing decisions for video streams that go live. With the help of IRS, it is possible to handle channels with specific processing needs. For example, it is possible to use this component to send certain streams to a chosen origin regardless of the PoPs that received the stream in the first place.
What can you expect from the system in the future?
Intelligest is a modern ingest edge architecture that achieves the goal of intelligently distributing video streams from PoPs to origins. According to the developers of Twitch, this system allows them to cut down on operational costs and also significantly helps with the utilization of resources. Also, Intelligest allows having a higher level of availability, which is especially important now that Twitch is such a large-scale platform.
In addition to the mentioned advantages, the media proxy of Intelligest ensures enhanced streaming capability to the platform’s broadcasters. The developers already have plans to develop better live media capabilities that are reliant on the use of Intelligest.
Another important thing to mention about Intelligest is that it achieves traffic prioritization at network edges. In this way, specific video streams can be marked as important according to their specific properties. The team of Twitch is determined to find new ways to enhance the video streaming experience for both viewers and creators.