Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Signal 14 min read Deep dive hardMaster

How to build large-scale end-to-end encrypted group video calls

Signal scaled end-to-end encrypted group calls from 5 to 40 participants by writing its own open source Selective Forwarding Unit in Rust, after a modified off-the-shelf SFU couldn't get past 8 participants because of server CPU usage. Selective forwarding is the only architecture that works with E2EE at that scale. The hard part is forwarding the right video resolutions as network conditions change. Three techniques handle it: VP8 simulcast with packet rewriting of RTP SSRCs, sequence numbers, timestamps and VP8 picture IDs; googcc/transport-cc delay-based congestion control, implemented as stream processing; and rate allocation rules that prioritize smaller layers and larger requested resolutions within the send budget.

Assumes: RTP basicsWebRTC conceptscongestion control basicsend-to-end encryption basics

Related posts

  • How OpenAI delivers low-latency voice AI at scale

    OpenAI hardMaster

    OpenAI rearchitected its WebRTC stack for ChatGPT voice and the Realtime API by splitting a stateless UDP relay from a stateful Go/Pion transceiver that owns ICE, DTLS and SRTP state. The design avoids one-public-port-per-session media termination, which fits poorly with Kubernetes and cloud load balancers. Server-generated ICE ufrags encode routing hints, so the relay can steer the first STUN packet to the owning transceiver without an external lookup. Relay flows are kept in memory with Redis as a backup, and Cloudflare geo-steered signaling plus a globally distributed relay fleet shorten the first hop and cut setup latency.

  • FFmpeg at Meta: Media Processing at Scale

    Meta Engineering easyNovice

    Meta retired its long-diverged internal FFmpeg fork by working with FFmpeg developers, FFlabs and VideoLAN to upstream the two capabilities it depended on. Threaded multi-lane transcoding, which decodes once and runs all output encoders in parallel, arrived over FFmpeg 6.0 through 8.0. In-loop decoding in FFmpeg 7.0 enables real-time PSNR/SSIM/VMAF quality metrics for livestreams. Infrastructure-specific patches, such as support for Meta's MSVP transcoding ASIC via FFmpeg's standard hardware acceleration APIs, stay internal and are rebased with extensive validation.

  • How we built a realtime system for responsive voice AI in six months

    OpenAI mediumAdept

    GPT-Live replaces turn-detector-based voice AI with a full-duplex voice model that listens and speaks simultaneously, delegating deeper reasoning and tool use to frontier models like GPT-5.5 over an asynchronous RPC path that never blocks media. The system separates a Go-based media fast path (replacing Python asyncio, with new p95 matching old p50) from application logic. It uses warm model-instance handoffs to perform context compaction without KV-cache rebuild pauses, prefills frontier-model sessions at call start, and derives discrete turns from overlapping speech via speculative and authoritative transcript views. Startup is cut to a single UDP packet through WARP, a set of backward-compatible WebRTC changes that reduces handshakes from six round trips to one, plus Instant Connect for pre-negotiated SDP. Shadow testing on production traffic showed that capacity depends on concurrent sessions and CPU-side stream handling, not just GPU throughput.

  • How to build a 30M RPS CDN in 30 days with Rust and WASM

    Railway mediumAdept

    Railway built Hikari, its own CDN with 60 POPs and 180+ nodes, in 30 days. It serves ~1M RPS at peak, has absorbed 30M RPS DDoS attacks, and benchmarks to ~150M RPS. The design centers on safe deployment: a Rust reconciliation-loop sidecar (hikari-keeper) replaces Ansible for node config, BGP announcement and fd-handoff binary upgrades, while per-request business logic runs as versioned wasmtime/WASI guests that can be swapped in seconds without dropping connections. It also covers anycast routing pitfalls with global transit networks, mitigated by BGP community tagging, and a thread-per-core tokio design with thread-local warm guest pools that avoids the ~10μs cold-instantiate cost and cross-core contention.

  • Adopting AV1 for Real-Time Communication (RTC) at Scale

    Meta Engineering mediumAdept

    Meta now runs AV1 for real-time video calls on most mobile devices in Messenger and WhatsApp. AV1 gives at least a 20% bitrate reduction over H.264/AVC on low-end and mid-range phones, which matters most below 100 kbps. Getting there took an internal low-complexity encoder with an ultra-low preset comparable to H.264, the dav1d decoder chosen for power efficiency, and binary-size cuts such as trimming the quantization-matrix tool. An ML-based rtc_score model decides which Android devices are eligible, while runtime encode/decode-latency monitoring adjusts presets, falls back to H.264, and allows asymmetric codecs, alongside further rate control and error resilience work.

The quest for software engineering knowledge.

Look:
Layout: