Updated November 2026: LiveKit’s published single-node benchmark, LiveKit Agents 1.8 and the 2.0 beta, Pipecat 1.x and Deepgram’s pending acquisition of Daily, Twilio Video’s reversed sunset, and a new section on monitoring WebRTC across regions and agent fleets.

WebRTC at scale: the short answer

Running WebRTC at scale comes down to three moves, in this order. First, cut what each SFU node forwards with LastN and simulcast or SVC, so egress grows with N instead of N². Second, when one node or one region is no longer enough, cascade SFUs: each participant joins the nearest node, and the nodes relay media to each other over the cloud backbone. Third, put view-only audiences beyond a few thousand on an SFU-to-HLS bridge and a CDN, and run AI agents as ordinary room participants from a worker fleet that scales separately from the SFUs. For a capacity anchor, LiveKit’s published benchmark (self-hosting docs, 2026) puts one 16-core node at about 150 two-way 720p participants in a single meeting, or one publisher to 3,000 viewers.

When a node fails, everyone connected to it loses media and has to reconnect. On a cascaded mesh they rejoin the next-nearest node and the room survives. On self-hosted LiveKit, where each room lives on one node, the whole room drops. In both designs the coordination layer that tracks rooms and nodes must survive the loss of any single machine, or one reboot takes down every region at once.


Why this matters

If you are a product manager, founder, or operations lead at a company shipping conferencing, telemedicine, e-learning, live shopping, contact-centre video, or an AI-agent product, the difference between a system that survives the moment your traffic doubles and a system that goes dark is almost entirely an architectural decision made long before the traffic arrives. A confident buyer should be able to answer three questions without flinching: how many concurrent participants the system supports before it adds a server, how the system behaves when one of those servers fails, and what changes when AI agents enter the room as first-class participants. This article answers those three questions for the non-network-engineer, points the senior engineer at the right code paths and references, and gives a working mental model of every meaningful scaling pattern in WebRTC as it stands in 2026.


Where a single SFU stops scaling

A Selective Forwarding Unit is the box in the middle of a multi-party WebRTC call that receives every participant's media, decides which streams to send to which other participants, and forwards them. For the wider topology picture — Mesh, MCU, SFU — see SFU vs MCU vs Mesh: the three WebRTC topologies. For how far each topology carries a product roadmap in business terms, see our guide to WebRTC scalability by architecture.

A single SFU is a single process on a single machine. Its limits are physical, and they show up in this order as load grows:

The first ceiling is CPU. Even though an SFU does not transcode, it parses RTP headers on every incoming packet, runs SRTP encryption on every outgoing packet, runs RTCP feedback loops, and handles ICE consent freshness for every peer connection. The best public anchor is LiveKit’s own benchmark in its 2026 self-hosting docs. On a 16-core Google Cloud c2-standard-16, a 720p meeting with 150 publishers and 150 subscribers ran at 85% CPU, a one-to-many livestream reached 3,000 subscribers at 92% CPU, and an audio-only room carried 10 speakers to 3,000 listeners at 80% CPU. mediasoup, Janus and Jitsi Videobridge land in the same order of magnitude when tuned well. The real number moves with the codec, the simulcast layer count and the call shape, so measure your own room shape before you size the fleet.

The second ceiling is network. A 10 Gbps NIC at 80% utilisation moves 1 GB/s of media. A 1 Mbps video stream consumes about 125 KB/s of egress per subscriber. A 100-participant call where every participant subscribes to every other publisher is 100 × 99 ≈ 9,900 egress streams on the SFU — at 1 Mbps each that's 9.9 Gbps, which saturates a 10 Gbps link. The pattern is brutal: egress scales as O(N²) for fully-meshed conferences, because each of N participants subscribes to N−1 others. LastN forwarding (covered below) breaks the quadratic; without it, the network card is the wall.

The third ceiling is operational. A single SFU is a single point of failure. If the process crashes, every active call drops. If the host has a kernel panic, every active call drops. If the cloud provider has a regional outage, every active call drops. Beyond a few hundred users, no production team accepts that risk.

The single-SFU architecture is the right answer for a tutorial, an MVP, and any product whose peak concurrent call size is under a few hundred. Past that, the architecture has to change.

Diagram titled Where one SFU stops scaling: three ceilings on one Selective Forwarding Unit, in the order they hit. Card 1, CPU ceiling: every packet needs RTP parsing and SRTP, every peer needs RTCP and ICE consent; a 32-core x86 server with AES-NI forwards about 600 to 1,200 video streams at 1 Mbps; mediasoup and LiveKit land at about 500 to 800 video participants per node; this ceiling hits first in dense conferences with high fan-out. Card 2, network ceiling: each of N people receives the other N-1, so egress grows as N squared; 100 participants means 100 times 99 times 1 Mbps, 9.9 Gbps of SFU egress; a 10 Gbps NIC saturates, and LastN with simulcast breaks the quadratic; this ceiling hits first in star-shaped calls where everyone watches everyone. Card 3, operational ceiling: one process on one host in one region is a single point of failure; a process crash, kernel panic or regional outage drops every call; it is present from day one, and no team accepts it past a few hundred users. Bottom line: one SFU fits an MVP or a tutorial; past a few hundred users, a cascade. Figure 1. Why one SFU runs out of room. CPU saturates first in dense conferences with high publisher-to-subscriber fan-out; network saturates first in star-shaped broadcasts; operational risk caps any production deployment at a single-box scale.

Cascaded SFUs: the standard scaling pattern in 2026

A cascaded SFU architecture replaces the single media server with a mesh of media servers that forward each other's traffic. A participant connects to the SFU closest to them — geographically, by latency, or by load — and that SFU forwards the participant's media to the other SFUs that hold subscribers in the same room. From the user's point of view, a cascaded system looks exactly like a single SFU; from the system's point of view, the load is now distributed across as many nodes as the operator wants to pay for.

The pattern is sometimes called regional bridging when the nodes are placed in geographically distinct data centres and the inter-node traffic rides the cloud provider's backbone rather than the public internet. The result: a participant in Tokyo connects to a Tokyo SFU, a participant in Frankfurt connects to a Frankfurt SFU, and the two SFUs exchange media over the cloud's private backbone — which is faster, more predictable, and almost always cheaper than two public-internet RTT hops between Tokyo and Frankfurt browsers.

Vendors expose the pattern differently. LiveKit Cloud runs a distributed mesh in which one room can span servers in several regions. Self-hosted open-source LiveKit does not: its docs state that each room must fit on a single node, and extra nodes only spread separate rooms. Jitsi Videobridge cascades through Octo, now run as relays (Jitsi calls them secure Octo) that link each pair of bridges with ICE and DTLS/SRTP. mediasoup exposes the primitive as Pipe Transports, which join two router instances at the API level and leave the cascade design to your application. Janus gets a similar effect with VideoRoom RTP forwarding. Daily runs rooms on a global real-time network with 75 points of presence (Deepgram, October 2026). Cloudflare Realtime is built on Cloudflare’s edge and charges $0.05 per GB of SFU and TURN egress after a shared 1,000 GB free each month (Cloudflare docs, 2026). Twilio Video is still running: Twilio announced an end-of-life in December 2023, then reversed it on October 21, 2024 and kept Video as a standalone product. In 2026, every major SFU offers some form of cascading, as a managed feature or as a primitive you compose, though not every one lets a single room span nodes.

How the cascade actually works

Three things have to be right for a cascade to deliver the latency and reliability properties the architecture promises.

The first is room-to-node routing: when a new participant joins a room, the system has to decide which node they connect to. The two common strategies are participant locality (the node closest to the participant) and room affinity (the node that already holds the most participants in this room). In practice production systems combine the two: prefer the node closest to the new participant unless joining that node forces an extra cascade hop that a different node would avoid. LiveKit's router uses Redis as a coordination layer; Jitsi's Octo uses a central bridge selector; mediasoup leaves the choice to the application's signalling layer.

The second is inter-node transport: how SFU A forwards a participant’s media to SFU B. Implementations split into two schools. mediasoup’s Pipe Transport sends plain RTP over UDP between instances, with SRTP as an option, and assumes you control the network in between. There is no per-stream ICE or DTLS handshake, which keeps the hop cheap when both ends sit in one trusted private network. Jitsi’s relays take the opposite view: every bridge pair runs ICE and DTLS/SRTP, so the link is encrypted and can cross untrusted networks, at the cost of one handshake per bridge pair rather than per stream. Managed meshes such as LiveKit Cloud do not publish their wire protocol; what you can check is that the hop rides their private backbone. Whichever school you pick, nodes should authenticate to each other once, at boot, with mutual TLS or a shared key, and no node should join the mesh unauthenticated.

The third is session integrity: when a participant in Tokyo joins a room that already has a participant in Frankfurt, the Tokyo SFU must learn about the Frankfurt participant, and vice versa, in time for the new participant to subscribe. This is a distributed-state problem the coordination layer solves; Redis, etcd, and Apache ZooKeeper are the typical choices. Production teams target sub-second propagation, typically 50 to 200 ms from join to a complete roster.

Diagram titled A cascaded SFU mesh: one room, three regions, everyone joins the nearest node. Top row, three participant groups: APAC participants in Tokyo and Singapore, EMEA participants in Frankfurt and London, AMER participants in Virginia and Sao Paulo. Each group connects by a blue last-mile line to the SFU below it: Tokyo SFU in ap-northeast-1, Frankfurt SFU in eu-central-1, us-east-1 SFU in N. Virginia. Green backbone links join every pair of nodes, Tokyo to Frankfurt, Frankfurt to us-east-1 and Tokyo to us-east-1, each labelled 6.1 Mbps. Dashed purple lines run from every SFU down to the coordination layer: a Redis cluster, etcd or Hazelcast that keeps the room roster and node membership synced in 50 to 200 ms, sized for the same blast radius as the SFU fleet. A grey box gives the worked example: 100 participants, LastN N = 4, about 33 people per node; egress about 237 Mbps per node, and each node pair carries about 5 Mbps each way. Legend: backbone hop, RTP over the cloud's private network with no DTLS per stream; last mile, WebRTC with DTLS-SRTP and ICE over the public internet; dashed, room state sync with the coordination layer. Figure 2. A cascaded SFU mesh. Three regional nodes share a room; each participant connects to the nearest node; node-to-node hops ride the cloud backbone, not the public internet; a coordination layer (Redis here) keeps the room roster synchronised across the mesh.

What cascading is not

Cascading is not the same as federation — separate WebRTC platforms exchanging media across organisational trust boundaries (the IETF rtcweb working group has explored federation, but it remains rare in production). A cascade is a single platform running a single room across multiple physical locations.

Cascading is not the same as horizontal scaling of the signalling layer — adding more web servers in front of the SFU. Signalling does scale horizontally trivially (it is HTTP plus WebSockets whose state lives in a shared store), and every serious WebRTC product scales signalling separately from media. But the media plane needs the cascade pattern; load-balancing signalling alone does not increase media capacity.

And cascading is not the same as multi-region failover. A cascade is active-active: every region carries live traffic. Failover is a separate property the cascade gives you almost for free, because losing one region degrades the call (participants in that region reconnect to the next-nearest node) rather than killing it.


LastN and dominant-speaker forwarding: making the network reasonable

Even with a cascade, the network bill at a 100-participant call is unreasonable if every subscriber receives every other publisher's video. LastN is the optimisation that almost every modern SFU implements: only the N most recently-active speakers' video streams are forwarded to any given subscriber. Every participant’s audio is still forwarded (audio is cheap); only the video forwarding is constrained.

The dominant-speaker identification algorithm Jitsi published in 2015 (Grozev, Marinov, Singh, Ivov — "Last N: Relevance-Based Selectivity for Forwarding Video in Multimedia Conferences") is the de-facto reference: it works on the RTP audio-level extension header (RFC 6464) without decoding the audio, ranks endpoints by recent voice activity, and the SFU forwards only the top N video streams to each subscriber. The paper’s headline result: in a 30-participant conference, forwarding video for only 10 endpoints used 45% less CPU and 63% less bandwidth than full-star forwarding. Absolute CPU figures from 2015 hardware no longer apply, but the shape does: LastN turns the O(N²) video bill into an O(N) one, while audio forwarding still grows with N² at about 32 kbps per stream. That is what lets a call grow from dozens of participants to a hundred on one box; rooms in the high hundreds or thousands also cap forwarded audio to the loudest few speakers and rely on silence suppression (DTX).

In a cascaded mesh, LastN runs per-node: each regional SFU computes the dominant speakers across the room (using the same audio-level signal it receives from every other node in the mesh) and forwards only those to its local subscribers. The dominant-speaker computation is global; the forwarding decision is local. This is the second reason cascaded SFUs scale: the cascade carries every audio stream between nodes (audio is cheap — Opus at 32 kbps × 100 participants × 3 nodes is under 10 Mbps), but only the dominant N video streams.

Combined with simulcast and SVC (covered in Simulcast and SVC: how the SFU serves a heterogeneous audience), LastN gives the SFU a per-subscriber choice: which spatial layer of which dominant speaker's video to send. A subscriber on a phone gets the low-resolution layer of the active speaker; a subscriber on a desktop in a 4-up grid gets the medium-resolution layer of four speakers. Same SFU, same room, different bills.


Numeric example: scaling a 100-participant conference

Let's compute the cost of scaling a 100-person conference with and without the patterns above.

Naive star topology, one SFU, no LastN. Every participant publishes one 1 Mbps video stream; every participant subscribes to every other publisher's video. SFU egress is 100 × 99 × 1 Mbps = 9.9 Gbps. A single 10 Gbps NIC is saturated; the call cannot reliably scale past about 80 participants on this hardware. Daily peak-hour egress, if the call runs 4 hours a day: 9.9 Gbps × 4 h × 3,600 s × 1 GB / 8 Gb = roughly 17.8 TB/day of egress per call.

Same call, LastN with N=4. Every subscriber receives the four most-recently-active speakers’ video plus the forwarded audio of the other 99 participants. SFU egress per subscriber: 4 × 1 Mbps + 99 × 32 kbps (audio) ≈ 7.2 Mbps. SFU total egress: 100 × 7.2 Mbps = 720 Mbps. The single 10 Gbps NIC is now at 7% utilisation; the call fits comfortably on one box. Daily egress: roughly 1.3 TB/day — a 14× reduction.

Same call, LastN N=4, cascaded across three regional SFUs (33 participants per region). Each regional SFU forwards: 4 active-speaker videos × 33 local subscribers = 132 video flows locally, plus the 4 active-speaker videos shared between nodes = 4 × 2 inter-node hops = 8 inter-node video flows. Per-region SFU egress: 132 × 1 Mbps + 33 × 99 × 32 kbps ≈ 237 Mbps. Inter-node traffic per pair, each way: at most the 4 active-speaker videos (4 × 1 Mbps) plus the sending node’s 33 local audio streams (33 × 32 kbps ≈ 1.1 Mbps), about 5 Mbps. The architecture now handles regional failure (one node down degrades but does not drop the call), gives Tokyo participants Tokyo latency, and the per-region per-hour bill is roughly 107 GB — a third of what the single-SFU LastN model carried, distributed across three regions.

The numbers above are illustrative; production rates depend on codec, simulcast layer choice, RTCP feedback overhead, and the specific inter-node protocol. But the order of magnitude is correct, and the pattern is universal: LastN delivers the first 10× of scaling; cascade delivers the second.


The 100K-viewer architecture: SFU-to-HLS broadcast

Cascaded SFUs scale conferences — calls where most participants are also publishers — into the low thousands. But there is a different scale problem on the other side: a town hall, a live-shopping stream, a sports watch-along, where a handful of presenters broadcast to tens or hundreds of thousands of viewers, almost none of whom publish anything. WebRTC is the wrong tool for that audience size, for two reasons:

The first is economics. A 100,000-viewer WebRTC broadcast over a cascaded SFU mesh is 100,000 active peer connections, each with its own DTLS state, ICE consent freshness, RTCP feedback loop, and SRTP context. The CPU and memory bill on the SFU side is hostile, and the egress bill is no better than CDN egress would be. WebRTC has no caching layer; a CDN does.

The second is what the audience actually needs. The presenters care about latency — they want the chat reactions to land while they are still speaking — but the audience mostly cares about reliability, scrub-back, and the ability to join late. Those properties are exactly what HTTP-based streaming was designed for, and what WebRTC was specifically designed not to be. The threshold is economic rather than a hard limit: our Worldcast Live project delivered HD concerts over WebRTC to 10,000 simultaneous viewers at 0.4 to 0.5 s, because sub-second latency was the product.

The 2026 production pattern is the SFU-to-HLS bridge: the SFU continues to handle the publisher side and the small interactive audience (presenters, panellists, VIPs, contact-centre agents — anyone whose latency budget is sub-second), and a packager attached to the SFU repackages the active-speaker mix into a Low-Latency HLS or chunked-CMAF stream that the CDN fans out to the wider audience. The bridge gives the wider audience a 2-to-5-second glass-to-glass latency through LL-HLS — slower than WebRTC's 100–300 ms, but still fast enough that the chat reactions feel live, and orders of magnitude cheaper to serve. The packager appears to the SFU as a regular subscriber: it joins the room, pulls the active-speaker layout, and emits LL-HLS segments to an origin that a CDN like Cloudflare Stream, Fastly, AWS CloudFront, or Akamai then distributes.

This pattern is the architecture LiveKit uses for its livestreaming product (LiveKit’s WebRTC vs HLS post lays out the trade-offs), and Daily’s live streaming and recording features implement the same idea. Cloudflare's Realtime SFU pairs with Cloudflare Stream for the same effect. The pattern is now so standard that newer protocol families — see Media over QUIC — are explicitly designed to make the bridge less seam-y, by treating interactive and broadcast media on the same transport.

The detailed mechanics of the bridge — how the SFU's RTP frames become CMAF segments, how the active-speaker layout is composed, how audio mixing works — are covered in Recording, Broadcasting, and the WebRTC-to-HLS Bridge. For the LL-HLS reader side, see LL-HLS in depth.

Diagram titled The SFU-to-HLS broadcast bridge: same publishers, two latency tiers, WebRTC inside and LL-HLS outside. Top panel, interactive tier on WebRTC, glass-to-glass 200 to 350 ms, with cost growing with active participants: Presenters, 2 to 8 publishers with simulcast video, and Panellists and VIPs, 10 to 200 interactive participants, both feed the cascaded SFU mesh, which uses regional nodes, LastN, simulcast and active-speaker forwarding. An orange arrow runs from the SFU mesh down to the LL-HLS packager, which joins as a participant, composes the speaker layout and audio mix, and emits CMAF segments. A second orange arrow runs into the bottom panel, broadcast tier on LL-HLS or chunked CMAF, glass-to-glass 2 to 5 s, cost is CDN egress, cheap per viewer: the packager feeds the CDN (Cloudflare, Fastly, CloudFront, Akamai), and the CDN feeds the view-only audience of 5,000 to 100,000+ viewers on hls.js, Shaka and native players. Note: the tiers share publishers, not subscribers; viewer chat returns over WebSocket. Figure 3. The SFU-to-HLS bridge. The interactive tier runs on cascaded WebRTC and lives inside a 300 ms latency budget. The broadcast tier rides an LL-HLS packager and a CDN and lives inside a 2-to-5 second budget. The two share publishers, not subscribers.

AI agents enter the room

Until 2023, nearly every participant in a WebRTC room was a human with a browser. In 2024 the first wave of hosted voice-agent platforms (Vapi, Retell, Vocode) put headless bots into calls. In 2025 LiveKit Agents reached 1.0, and OpenAI made its Realtime API generally available with the gpt-realtime model in August 2025, adding SIP calling and image input; Google’s Gemini Live API covers the same speech-to-speech ground. Pipecat followed with its 1.0 release on April 14, 2026. Investors followed the pattern too: LiveKit raised a $100M Series C at a $1B valuation in January 2026 and says it powers ChatGPT’s Advanced Voice Mode. In 2026, an AI agent participant is a routine load on the same SFU infrastructure that carries human calls.

An AI agent in a WebRTC room is, mechanically, the simplest possible peer. It runs as a process somewhere (typically inside the same data centre as a regional SFU, to minimise hop count), joins a Room as a participant, subscribes to one or more human audio tracks, publishes its own audio track, and runs the voice-agent pipeline internally: voice-activity detection (VAD) to detect end-of-speech, speech-to-text (STT) to transcribe what the human said, a large language model (LLM) to generate a response, and text-to-speech (TTS) to synthesise that response back into audio that flows out over the agent's WebRTC publish track. The agent never sees a video frame in the simplest case; in 2026 it increasingly does, because realtime models such as gpt-realtime and Gemini Live accept images or video frames and reason over them inside the same turn.

LiveKit Agents — the integrated stack

LiveKit Agents is open source (Apache 2.0) and ships Python and Node.js SDKs; the latest stable Python release is 1.8.10, published October 28, 2026 on PyPI. The model has three parts: a worker registers with the LiveKit server, the server dispatches a job to it when a room needs an agent, and the job runs an AgentSession that orchestrates VAD, STT, LLM and TTS through swappable plugins, or drives a single realtime speech-to-speech model. AgentSession replaced the older VoicePipelineAgent class with the 1.0 API, so tutorials that still use VoicePipelineAgent describe the pre-1.0 framework.

Two releases matter most for production. Version 1.5 (March 19, 2026) added adaptive interruption handling, an audio model that tells a real interruption apart from a backchannel, a cough or background noise, plus dynamic endpointing and per-turn latency metrics. In October 2026 LiveKit opened a 2.0 beta, still marked staging-only, that adds text and A2A endpoints, durable conversation threads any worker can resume, and a Rust core for turn handling. Build on 1.8 today and track 2.0 before you commit to it.

Because LiveKit Agents joins as a normal participant, the cascaded SFU mesh distributes agent traffic the same way it distributes human traffic. A worker fleet runs in every region; a Tokyo human gets a Tokyo agent; latency stays sub-second.

Pipecat — the vendor-neutral alternative

Pipecat reached 1.0 on April 14, 2026 and was at 1.7 by August 2026 (PyPI). It is BSD-2 licensed and vendor-neutral. On October 29, 2026 Deepgram announced it is acquiring Daily, Pipecat’s maintainer; the deal had not closed when we checked in November 2026, and Deepgram says Pipecat stays open source and free, with an independent Pipecat Foundation being set up. Pipecat is pipeline-first: you declare a directed graph of processors — VAD, STT, LLM, TTS, business logic — and audio frames flow through them. The model is more flexible than LiveKit Agents and the deployment story is more varied: Pipecat workers can speak WebRTC (via Daily's SDK or any WebRTC transport adapter), SIP and WebSocket media streams from telephony providers, or plain WebSockets. The trade-off is that Pipecat does not give you a media server — you bring your own — where LiveKit Agents and LiveKit's SFU are designed as a single stack.

The 2026 calculus: pick LiveKit Agents when WebRTC and a single-vendor stack are acceptable; pick Pipecat when you want to bring your own transport or media server, or build a custom processor graph across STT, LLM and TTS providers. Both handle telephony; LiveKit does it through its own SIP service. Both frameworks coexist and interoperate at the room boundary — a LiveKit room can host a Pipecat agent if the Pipecat agent uses a LiveKit transport adapter. For a head-to-head on code shape, telephony and cost, see Pipecat vs LiveKit Agents.

Vocode and the rest

Vocode is the older lineage — Python-based, originally tied to its own infrastructure, now also vendor-neutral. Retell, Vapi, Bland.ai, and Dograh are commercial SaaS offerings built on the same primitives, each layered over their own choice of media server. In production, the typical pattern is to use an open-source framework (LiveKit Agents or Pipecat) for new builds and accept the trade-off that one or two vendor APIs are locked in.

What an AI agent changes about the SFU

The presence of an agent in a room changes three things at the SFU layer.

The first is subscription geometry. A typical 1-on-1 customer-service voice agent call has one human participant, one agent participant, and two streams (human audio, agent audio). A typical multi-party agent call — three humans plus one agent — has four participants publishing four audio tracks, and the SFU forwards 12 streams if everyone subscribes to everyone, or fewer with LastN. The agent is just another participant from the SFU's point of view.

The second is latency budget. A human-to-human call lives inside a 300 ms glass-to-glass budget. An agent call has a stricter budget on the agent side, because the user perceives the LLM-thinking pause as awkwardness if it crosses about 800 ms end-of-speech to start-of-response. Of that 800 ms, the agent's STT + LLM + TTS consume the majority; the WebRTC round trip into and out of the agent is supposed to be invisible. The cascaded SFU helps here in exactly the way it helps a human call: the agent worker runs in the same region as the user, the inter-node hop is unnecessary for the human-agent leg, the budget stays intact.

The third is scale. An agent worker is, computationally, an order of magnitude more expensive than a human participant (the GPU for the LLM, the GPU for the TTS, the network for the STT API). A serious agent product scales the worker fleet separately from the SFU fleet, often in front of a different cloud provider's GPU instances, and the SFU just sees them as participants. The worker fleet's autoscaling is driven by call concurrency; LiveKit dispatches jobs across whatever workers have registered, and hosted options such as LiveKit Cloud and Pipecat Cloud run the worker fleet for you.

Diagram titled An AI voice agent is one more participant: with LiveKit Agents 1.5 or Pipecat 1.0 the agent joins the room, listens and answers. Top panel, WebRTC room on a regional SFU, where both hops are ordinary WebRTC with DTLS-SRTP: Human, in a browser or phone, publishes audio; connected to the SFU, a regional node that sees a normal peer; connected to the agent worker, in the same data centre, which publishes audio. Bottom dashed panel, inside the agent worker: the voice pipeline, with a budget of about 800 ms from end of speech to start of reply, most of it spent in the orange steps. Six steps from top to bottom: Subscribe takes the human's audio track from the SFU and decodes Opus into PCM frames; VAD detects the end of speech with Silero or WebRTC VAD; STT, orange, transcribes what the human said with Deepgram or Whisper in 120 to 250 ms; LLM, orange, writes the reply with OpenAI, Anthropic or Google in 200 to 400 ms to first token; TTS, orange, speaks the reply while it streams with ElevenLabs or Cartesia; Publish encodes Opus and sends it back through the SFU as the agent's own outbound track. Interruption: when the human speaks, TTS stops and the partial transcript goes to the LLM. Figure 4. The 2026 voice-agent participant. The agent is just another peer in the SFU; what is novel is the worker's internal pipeline (VAD → STT → LLM → TTS) and the latency budget that pipeline has to live inside.

How do you monitor WebRTC at scale across regions and agent fleets?

Monitor WebRTC at scale in three layers and join them with shared labels: client-side getStats() samples per session, per-node SFU metrics per region, and per-turn timings from every agent worker, all tagged with region, node, room and participant type (human or AI agent). The shared labels let you follow one bad call from the browser, through the SFU node, to the agent that answered it.

Client layer. Every WebRTC endpoint exposes the W3C statistics API, getStats(), whose identifiers spec is a Candidate Recommendation Draft last revised in 2025. It reports packet loss, jitter, round-trip time, dropped frames and freezes per track. Sample every few seconds, aggregate on the client and ship one summary per session rather than raw samples, or a global fleet will flood your collector. Agent workers are clients too, so collect the same stats on their side of the call.

SFU layer. Each media node should export CPU, egress bandwidth, packets per second, room and track counts and inter-node relay health to Prometheus or an equivalent; open-source LiveKit exposes Prometheus metrics once you enable them in its config. Alert on the ceilings from the first section rather than on averages: by LiveKit’s own benchmark, a node at 85% CPU is already at its limit.

Agent layer. For a voice agent the number that matters is end-of-speech to first agent audio. LiveKit Agents reports per-turn latency metrics, and version 1.5 added a metrics field on each chat message plus session usage tracking. Track the p95 per region against the roughly 800 ms budget described above, and split it into STT, LLM and TTS time so you know which provider to chase when it drifts.

The rule we apply on contact-centre and agent projects: when hundreds of human or AI agents work across several regions, every alert already names the region and node, and every call record carries a trace ID shared by the client, the SFU and the agent worker. That turns “calls feel slow in Singapore” into one query.


Comparing the four scaling axes

The patterns above stack: a serious 2026 WebRTC product uses all of them at once, choosing per-room which mix applies. The table below summarises when each axis matters.

Scaling axisWhat it solvesWhen to addTypical cost shapeRisk
Single SFU, no optimisationSmall rooms in one region; a naive all-to-all 1 Mbps call tops out near 80 participants on a 10 Gbps NICDay one, MVPEgress grows with N² in all-to-all roomsSingle point of failure
LastN + simulcast/SVCO(N²) → O(N) network on dense conferencesFirst sign of network strainOne-time engineering, then freeLow; speaker detection needs tuning so video does not flip between speakers
Cascaded SFU meshMulti-region latency, capacity past one box, failoverPast one node’s room ceiling or any multi-region audiencePer-region SFU cost + inter-node egressCoordination layer (Redis) becomes a critical dependency
SFU-to-HLS bridgeView-only audience past ~5,000 concurrentWhen viewers vastly outnumber publishersCDN egress (cheap) + packager (modest)Latency tier shifts from 300 ms to 2–5 s for the broadcast audience
AI agent worker fleetReal-time AI participants in callsWhen the product roadmap commits to voice agentsGPU compute (the expensive part) + LLM API spendLatency budget on the agent side becomes a hard constraint
The right pattern is the union of rows 1, 2, and 3 for any serious conferencing product; rows 1–4 for a broadcast or live-shopping product; rows 1, 2, 3, and 5 for an AI-agent product; all five for an AI-agent-and-broadcast product (a 2026 live-shopping room where an AI agent answers buyer questions on the broadcast side).

A common WebRTC-at-scale mistake

The single most common production failure we see when reviewing a WebRTC-at-scale architecture is deploying a cascade without a coordination layer that survives a node failure. The cascade itself is the easy part, since most modern SFUs ship the primitive. The hard part is the room-state registry that tells every node which other nodes hold participants in which rooms. A single Redis instance in front of a four-region SFU mesh is a single point of failure that defeats the entire point of cascading. The fix is either a Redis cluster with quorum, or an etcd-backed registry, or a distributed-state library like Hazelcast — anything where the loss of one machine in the coordination layer does not freeze the mesh. We have seen architectures where the cascade was perfect and the coordination layer was a single t3.medium instance; when the t3.medium rebooted for security patching at 03:00, every call across four regions dropped. The cascade is a system; the coordination layer is part of the system; you size the coordination layer for the same blast-radius requirement as the SFU fleet.


WebRTC at scale: FAQ

How many participants can one SFU server handle?

It depends on room shape. LiveKit’s 2026 benchmark on a 16-core node shows about 150 publishers and 150 subscribers in one 720p meeting at 85% CPU, or one publisher to 3,000 viewers at 92% CPU; plan production capacity below those numbers.

Can a single LiveKit room span multiple servers?

On LiveKit Cloud, yes: its distributed mesh lets one room span regions. In self-hosted open-source LiveKit, no: each room must fit on one node, and extra nodes only spread separate rooms.

What is a cascaded SFU?

A cascaded SFU is a set of media servers that relay streams to each other, so one room runs across several servers or regions while each participant connects to the nearest node.

When should viewers move from WebRTC to HLS?

Move them when view-only viewers outnumber publishers by orders of magnitude, typically past a few thousand concurrent viewers. Keep presenters and VIPs on WebRTC and serve everyone else LL-HLS through a CDN at 2–5 s latency.

How do you scale WebRTC monitoring across a globally distributed agent workforce?

Collect getStats() on every client and agent worker, export per-node SFU metrics by region, record per-turn latency for AI agents, and tag everything with region, node, room and a shared trace ID so one query follows a call end to end.

What latency does a voice AI agent need?

Keep end-of-speech to first agent audio under about 800 ms. STT, LLM and TTS use most of that budget, so run the agent worker in the same region as the user’s SFU node.

Is Twilio Video shutting down?

No. Twilio announced an end-of-life for Programmable Video, then reversed it on October 21, 2024; Video remains a standalone Twilio product.

↓ Free download: WebRTC Scale-Up Pre-Flight Checklist30 items across 6 areas to check before release: single-SFU baseline, LastN and simulcast, cascade design, coordination layer, broadcast bridge and the AI-agent worker fleet.

Where Fora Soft fits in

Fora Soft has built WebRTC, conferencing, telemedicine, e-learning, contact-centre video, live-shopping, surveillance, and AR/VR products since 2005 across 250+ projects. The cascaded-SFU pattern is the default architectural choice on every project that crosses a few hundred concurrent participants. The SFU-to-HLS bridge is the standard for live-shopping and telemedicine grand-rounds products where a small panel broadcasts to a wider audience. The AI-agent layer is the newest line of work — LiveKit Agents and Pipecat are now the two stacks the team deploys most often, with the choice driven by whether telephony integration is part of the spec. When rooms outgrow one self-hosted node, our LiveKit development team chooses between LiveKit Cloud’s multi-region mesh and a self-hosted fleet with room-level sharding, and wires in the three-layer monitoring described above. In practice that means our WebRTC architecture design team plans the SFU cascade, regional bridges and media-server choice before the first room goes live, and our LiveKit AI agent development practice adds voice and video agents to those rooms inside the roughly 800 ms turn budget described above.

Video Streaming: A Complete Guide to Video Delivery: From ABR and CDNs to Players, WebRTC, DRM, and the Economics of Streaming - book cover

The book

Video Streaming: A Complete Guide to Video Delivery: From ABR and CDNs to Players, WebRTC, DRM, and the Economics of Streaming

Book 3 takes the scaling story in this article from diagram to design: how SFUs forward, simulcast and pick layers, how a cascade and its coordination layer survive a node failure, and how an LL-HLS bridge and a CDN carry the view-only audience at a price you can plan. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Will your WebRTC product hold when a room doubles?

Send us your peak room size, regions and whether voice agents are on the roadmap. We will size the SFU nodes, plan LastN and the cascade, check the coordination layer for a single point of failure, and cost the broadcast bridge. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →

See our case studies

References

  1. LiveKit — Scaling WebRTC with a Distributed Mesh, LiveKit Engineering, 2024. Vendor engineering blog by the team that built LiveKit; the canonical 2026 reference on cascaded-SFU mesh architecture and the per-region node design. Tier 3.
  2. LiveKit SFU Internals — official documentation, LiveKit, 2026. Reference documentation for the LiveKit SFU's distributed-mesh routing, Redis coordination, and worker dispatcher. Tier 3.
  3. LiveKit Agents — official documentation, LiveKit, 2026. Reference for AgentSession, turn handling (adaptive interruption since 1.5), plugins and dispatch. Tier 3.
  4. Pipecat — official documentation, Daily.co, 2026. The 1.0 release notes (April 14, 2026), processor model, and WebRTC/SIP transport adapters. Tier 3.
  5. LiveKit blog — A tale of two protocols: WebRTC vs HLS for live streaming, LiveKit, 2024–2026. The trade-off matrix for the SFU-to-HLS bridge architecture in 2026. Tier 3.
  6. Grozev, Marinov, Singh, Ivov — Last N: Relevance-Based Selectivity for Forwarding Video in Multimedia Conferences, NOSSDAV 2015. The reference paper for the LastN scheme; source of the 45% CPU / 63% bandwidth saving for 10 of 30 endpoints. Tier 5 (peer-reviewed academic).
  7. RFC 6464 — A Real-time Transport Protocol (RTP) Header Extension for Client-to-Mixer Audio Level Indication, Lennox, Ivov, Marocco, December 2011. Standards-track. The RTP audio-level header extension dominant-speaker identification depends on. Tier 1.
  8. RFC 8825 — Overview: Real-Time Protocols for Browser-Based Applications, Alvestrand, January 2021. Standards-track. The WebRTC architecture overview RFC. Tier 1.
  9. RFC 8835 — Transports for WebRTC, Alvestrand, January 2021. Standards-track. The transport requirements for WebRTC media; cited for inter-node transport choices in the cascade. Tier 1.
  10. mediasoup — Pipe Transport documentation, mediasoup project, 2026. Reference for the mediasoup primitive used to build a cascade across mediasoup instances. Tier 3.
  11. Jitsi Videobridge — Relays (secure Octo), Jitsi project, 2026. How bridge-to-bridge relays use ICE and DTLS/SRTP between each bridge pair. Tier 3.
  12. Cloudflare Realtime — official documentation, Cloudflare, 2026. Vendor documentation for the cascaded-edge SFU product, including the inter-edge backbone transport. Tier 3.
  13. OpenAI Realtime API — official documentation, OpenAI, 2026. Reference for the speech-in/speech-out API that LiveKit Agents and Pipecat both wrap. Tier 3.
  14. LiveKit — Self-hosting benchmarks, LiveKit, 2026. Single-node results on a 16-core c2-standard-16 (150×150 720p meeting, 1→3,000 livestream, 10→3,000 audio) and the rule that a self-hosted room must fit on one node. Tier 3.
  15. LiveKit — Python Agents 1.5.0 released, LiveKit, March 19, 2026. Adaptive interruption handling, dynamic endpointing, per-turn latency metrics. Tier 3.
  16. livekit-agents on PyPI, LiveKit, 2026. Release history; 1.8.10 published October 28, 2026. Tier 3.
  17. LiveKit Agents 2.0 beta (pull request #7757), LiveKit, October 2026. Text and A2A endpoints, durable threads, Rust core; staging only. Tier 3.
  18. pipecat-ai on PyPI, Pipecat, 2026. Release history: 1.0.0 on April 14, 2026, 1.7.0 on August 1, 2026. Tier 3.
  19. Deepgram — Deepgram is acquiring Daily, Deepgram, October 29, 2026. Deal announcement, Pipecat licence and foundation plans, Daily’s 75 points of presence. Tier 3.
  20. SiliconANGLE — LiveKit raises $100M at a $1B valuation, January 22, 2026. Series C details and ChatGPT Advanced Voice Mode. Tier 4.
  21. Twilio changelog — Twilio Video will remain a standalone product, Twilio, October 21, 2024. Reversal of the Programmable Video end-of-life. Tier 3.
  22. Cloudflare Realtime — SFU and TURN pricing, Cloudflare, 2026. $0.05 per GB egress after a shared 1,000 GB monthly free tier. Tier 3.
  23. W3C — Identifiers for WebRTC’s Statistics API, W3C, 2025. The getStats() metrics used for client-side monitoring. Tier 1.
  24. LiveKit server — sample configuration, LiveKit, 2026. Prometheus metrics endpoint configuration. Tier 3.