Solving the ‘Thundering Herd’ Problem in Live Video Streaming

Developers frequently encounter a significant challenge when scaling live video streaming systems, known as the ‘Thundering Herd’ effect. This scenario occurs when a large number of users simultaneously request access to the same video stream. Typical server solutions, under such conditions, attempt to establish a separate connection or launch an individual process for each viewer, inevitably leading to Out of Memory (OOM) errors and CPU overload.

This exact situation was experienced by a developer when a link to a test video broadcast was inadvertently shared in a corporate chat. The immediate surge in concurrent requests led to a server crash, as it failed to handle the load, exhausting all its resources.

An Innovative Approach to Video Traffic Optimization

Instead of investing in expensive cloud solutions or new hardware, an alternative strategy was proposed: to route traffic as cost-effectively as possible using the Go programming language. The goal was to create a highly efficient system capable of processing significant data volumes with minimal resource expenditure.

Ruseon Core: Impressive Performance Results

The outcome of this effort was the development of Ruseon Core, which demonstrated exceptional performance metrics. The system managed to achieve a throughput of 8.8 Gbps on a single CPU core, with Go’s garbage collector (GC) remaining largely idle. This accomplishment represents a significant breakthrough in video streaming optimization.

Advantages of the New Solution

  • Cost-Effectiveness: Eliminates the need for substantial investments in hardware or expensive cloud services.
  • Efficiency: High throughput with minimal CPU and memory resource utilization.
  • Scalability: Effectively overcomes the ‘Thundering Herd’ problem, allowing a large number of concurrent users to be served without system failures.
  • Flexibility: Utilizes raw RTSP streams, supported by most IP cameras, for retransmission to HLS, thereby eliminating proprietary software dependencies and enabling AI integration.

This solution opens new possibilities for creating economical and high-performance video surveillance and content streaming systems, particularly relevant for clients requiring long-term recording storage and integration with AI analytics systems.