Skip to content
← All concepts

Messaging & flow

WebRTC calling

Real-time audio and video between browsers and apps, with servers only for signalling and relaying when needed.

Peers exchange connection details through a signalling server (often over WebSockets), then try to connect directly. STUN discovers public addresses; when firewalls block direct paths, a TURN server relays the media. Group calls use an SFU that forwards each stream to the other participants.

See it in action

Step through the scenarios on the diagram.

Laying out diagram…

1/4Alice's browser creates an offer (codecs, keys) and sends it through the signalling server.

Alice
— Starts a call
Bob
— Answers
Signalling
— Relays offers and network candidates
TURN relay
— Used only when direct fails

How it works

  • Signalling: offer/answer and ICE candidates over WebSockets.
  • STUN for NAT discovery; TURN relays roughly 10–20% of calls.
  • SFU for groups; simulcast lets each viewer receive a suitable quality.

Trade-offs

  • TURN and SFU bandwidth is the main cost.
  • Recording and compliance need extra pipelines.

Seen in

Components involved

Related concepts