Hardware & InferenceOpen Source 🇷🇺 07.08.2026 13:02

Achieving 8.8 Gbps Video Traffic on a Single CPU Core in Go

MicrosoftMicrosoft
A developer from Habr describes building a custom RTSP-to-HLS streaming engine in Go called Ruseon Core to handle the Thundering Herd problem. The engine uses a zero-copy ring buffer with sync.Pool to avoid allocations, achieving 8.8 Gbps throughput on a single core, with minimal memory and CPU usage, unlike FFmpeg or MediaMTX.
After a shared link caused a thundering herd and server OOM, the author decided to build a custom streaming engine in Go instead of renting more powerful hardware. The engine, named Ruseon Core, ingests RTSP streams and outputs HLS without transcoding, just relaying bytes. The key feature is a zero-copy ring buffer with sync.Pool: frames are written once into a buffer from a pool and shared with all subscribers, eliminating allocations and GC pressure. Benchmark shows 13.9 ns/op and 0 B/op. Load testing with k6 (1000 users) on a Ryzen 5600x achieved 8.8 Gbps (81 GB in 70 seconds) with 60k successful HTTP responses and no failures. Subscriber protection uses non-blocking channel sends with drop of frames for slow clients, and a NeedsIFrame flag to resync on the next keyframe. A sliding window of 5 HLS segments is kept in memory; stale segments return 404, causing players like hls.js to jump to the live edge. The system uses 250 MB RAM for 100 streams, but OS socket buffers add overhead. The author warns about sync.Pool pitfalls and suggests that for non-transcoding workloads, avoiding FFmpeg and controlling memory with zero-copy is beneficial.
Abbreviations
CPU = Central Processing Unit — Центральный процессор
RTSP = Real-Time Streaming Protocol — Протокол потоковой передачи в реальном времени
HLS = HTTP Live Streaming — HTTP Live Streaming
OOM = Out Of Memory — Нехватка памяти
SDK = Software Development Kit — Комплект разработки программного обеспечения
HTTP = HyperText Transfer Protocol — Протокол передачи гипертекста
Source: Habr — хаб ИИ — original
Our earlier posts on this topic ↓
Fresh news