Media & streaming, an interactive architecture walkthrough

Video conferencing: how the architecture works

How a video conferencing system connects clients with WebRTC, forwards streams through an SFU, and adapts quality to each viewer's bandwidth.

This is a learning explainer based on public engineering writing and general design practice. It is simplified, it is not the actual architecture of any company, and it may be inaccurate.

24 components, 24 connections, 12 steps. Updated 4 November 2026.

Interactive diagram

Overview

A video conferencing system lets a group see and hear each other with a delay low enough for conversation, usually under a few hundred milliseconds. Clients use WebRTC: they negotiate codecs and encryption through a signaling channel the application provides, find a network path with STUN, and fall back to a TURN relay when firewalls block direct UDP.

Media goes through a selective forwarding unit (SFU) rather than a full mesh or a mixing server. Each participant uploads one stream, and the SFU forwards it to everyone else, choosing per viewer which of several simulcast qualities to send based on their bandwidth and what is on screen. Meetings spanning regions cascade between SFUs, and recording and captions join as hidden participants. This is a simplified learning design, not any product's actual architecture.

Trade-offs and what changes at scale

An SFU keeps upload constant and server CPU low, but every participant still downloads several streams, so large meetings forward only the active speakers' video. A mixing server would send one stream per viewer but costs much more CPU and adds delay. TURN relays make calls work on restrictive networks at a real bandwidth cost. Server-side recording and captions need access to media, which conflicts with end-to-end encryption. At larger scale capacity is planned per region, with meetings placed on SFUs close to most of their participants.

How it works, step by step

The walkthrough above, as text. Each step lights up the components named under it.

  1. A participant opens the meeting link, and the Meeting Service checks their role and the meeting's settings, holding them in a waiting room if the host requires it. Control actions go over HTTPS; media never touches this path.

    Components Meeting Service, Browser Client, Meeting DBVia join meeting

  2. The SFU Allocator picks a media server with spare capacity close to the first participants and records the choice in Room State. Everyone else in the meeting is then sent to the same server.

    Components SFU Allocator, Room StateVia assign SFU

  3. The client opens a WebSocket to the Signaling Service and exchanges session descriptions with the SFU: which codecs, tracks and encryption to use. WebRTC leaves signaling to the application, so this channel is the product's own protocol.

    Components Signaling Service, Room State, SFU NodeVia WebSocket

  4. The client asks the STUN Server for its public address and gathers candidate paths to the SFU. Most connections then go directly over UDP, which is best for latency.

    Components STUN ServerVia binding request

  5. When a firewall or strict NAT blocks every direct path, media goes through the TURN Relay, often over TCP or TLS on port 443. Relaying costs bandwidth and adds latency, so it is only the fallback.

    Components TURN Relay, SFU NodeVia relay allocation

  6. Each client sends its encrypted audio and video once to the SFU Node, which forwards it to the other participants without decoding or mixing it. Forwarding instead of mixing keeps server CPU low and latency short.

    Components SFU Node, Desktop & Mobile Apps, Why an SFUVia SRTP media

  7. Cameras send three qualities at once (simulcast), and the SFU Node forwards the high layer for the active speaker and low layers for thumbnails, based on each viewer's bandwidth. A viewer on a weak network gets a smaller stream instead of freezing everyone else.

    Components SFU NodeVia negotiate

  8. When participants join from another continent, a Remote SFU Node near them receives one copy of each stream from the first SFU and serves local viewers. Each viewer then connects to a nearby server instead of crossing an ocean.

    Components Remote SFU NodeVia cascade streams

  9. Chat and reactions go to In-meeting Chat over the regular connection. Text needs reliable delivery and history, which the media path does not provide.

    Components In-meeting ChatVia chat

  10. For Live Captions, the SFU forwards audio to a speech recognizer, and the text is sent to participants through signaling. Because the server can read media for this, end-to-end encrypted meetings disable it.

    Components Live Captions, Signaling ServiceVia audio

  11. Recording adds a Recording Bot that joins like a hidden participant and receives every track, and the Recording Compositor mixes them into one file in the Recording Store. Mixing happens only for recordings, not for the live meeting.

    Components Recording Bot, Recording Compositor, Recording StoreVia tracks

  12. Clients and SFUs report packet loss, jitter and frozen frames to Quality Telemetry. Most call problems are on the user's network, and these numbers show where.

    Components Quality Telemetry, Browser ClientVia stats

Sequence diagram

The same walkthrough as a UML sequence diagram, one lane per layer or group (18 components in all), left to right in the order a request reaches them, numbered by step. A loop on a lane is a step that stays inside that group. Solid arrows are synchronous calls, dashed are asynchronous.

Video conferencing: sequence diagram of the walkthroughMeeting ControlParticipantsMedia PlaneConnectivityStorageQualityTelemetryjoin meeting1join link1read settings1assign SFU2room -> SFU2WebSocket3participants3negotiate3binding request4relay allocation5relayed media5SRTP media6negotiate7cascade streams8chat9audio10captions10tracks11raw tracks11write file11stats12client stats12

Key components

Meeting Controldomain

  • API Gateway: auth, meeting links, rate limits
  • Meeting DB: meetings, invites, settings (postgresql)
  • Meeting Service: rooms, roles, waiting room
  • Room State: who is in which room, on which SFU (redis)
  • Signaling Service: SDP offers/answers, ICE candidates (websocket)

Participantslayer

  • Browser Client: WebRTC camera, mic, screen share
  • Desktop & Mobile Apps: same media stack, native

Media Planeboundary

selective forwarding, no mixing

  • Live Captions: speech to text on the audio
  • Recording Bot: joins as a hidden participant
  • Remote SFU Node: same meeting, another region
  • SFU Allocator: picks a media server near participants
  • SFU Node: forwards streams, picks layers per viewer

Connectivitydomain

  • STUN Server: tells clients their public address
  • TURN Relay: relays media when direct paths fail

Storagedomain

  • In-meeting Chat: messages and reactions
  • Recording Compositor: mixes tracks into one video file
  • Recording Store: recordings and transcripts (s3)

Quality Telemetry

  • Quality Telemetry: packet loss, jitter, freezes per call

Sources

Public writing this explainer draws on. Read these for what the real systems actually do.

Make it yours

Copy this diagram and its walkthrough into your own workspace, then change anything: swap Postgres for DynamoDB, add a cache, rewrite the narration. Free, and it uses no AI credits.

This is a learning explainer based on public engineering writing and general design practice. It is simplified, it is not the actual architecture of any company, and it may be inaccurate. Real systems differ in the details. Browse the library.