Systems Architecture

Zero-Buffer Live Video Ingest: Scaling WebSockets and LL-HLS Across EU-East Edge Nodes

Published on July 28, 2026 By Marcus Lindqvist, Principal Systems Engineer 6 min read

Live streaming at scale is all about moving bytes from the broadcaster to thousands of concurrent viewers with near-zero latency and zero packet drop. When scaling our edge nodes across Finland, Sweden, and Eastern European regions, we tackled the challenge of handling massive inbound bitrates without overwhelming storage subsystems.

Why Disk Storage is the Enemy of Real-Time Video Ingestion

Standard HTTP caching CDNs store incoming media segments onto NVMe SSDs before serving them. While SSDs have impressive sequential write throughput, the concurrent I/O operations of 500+ unaligned 4K streams cause write amplification and kernel context switches.

At RelayCDN, we implemented an in-memory Circular Lockless Ring Buffer (CLRB):

  • Incoming chunks from WebSocket tunnels or gRPC streams are written directly to RAM buffers allocated per channel.
  • Edge egress workers serve player playback manifests directly from memory segments without touching the disk controller.
  • RAM usage is strictly bounded: each live channel retains only the active 6-second window necessary for LL-HLS playback.

WebSocket Ingestion Tunnel Protocol

For clients that cannot support full gRPC stacks, we designed a lightweight binary WebSocket handshake protocol that operates over standard port 443 with TLS:

WebSocket Ingestion Frame Format
[ 4 bytes: Magic Header 0x5243444E ]
[ 8 bytes: Sequence Counter ID ]
[ 2 bytes: Payload Flags (Keyframe / Audio / Video) ]
[ 4 bytes: Payload Byte Length ]
[ N bytes: Raw fMP4 / H.264 NAL Units ]

Edge Performance in Production

Deploying this architecture across our Helsinki (FI-01), Stockholm (SE-01), and Moscow (RU-01) nodes delivered immediate improvements:

  • CPU overhead per stream: Decreased by 68% due to zero syscall context switching.
  • Memory footprint: Maintained under 24MB per active 1080p stream.
  • Glass-to-glass latency: Reduced to 650ms worldwide when paired with LL-HLS playback clients.
← Back to Blog Read Ingest API Docs