"Design Zoom" is the question where almost everything you know about web systems is slightly wrong. The traffic is not request and response, it is a continuous stream of small packets. Losing a packet is better than waiting for it. A server that is 100 ms further away makes the conversation feel broken. And the work scales with the square of the meeting size if you are careless.
The interviewer is testing whether you can separate signaling (who is in the meeting, what they can do), which is ordinary web engineering, from media (the audio and video packets), which is not. The core of the answer is the choice of media topology, and the reasoning behind it, using numbers.
The transport background is in TCP, UDP and QUIC, which explains why real-time media chooses loss over delay. For one-to-many live video with a very large audience, a different design fits better: see Design Twitch.
Clarify the requirements
Functional requirements:
- Create or schedule a meeting and join it from a link, on desktop, phone or browser.
- Send and receive audio and video, with mute and camera controls.
- Share a screen.
- In-meeting chat and a participant list.
- Record a meeting to the cloud.
Out of scope, said aloud: calendar integration, virtual backgrounds, live captions, large webinars with thousands of viewers (mention as a variant), telephony dial-in.
Non-functional requirements: these decide the architecture.
- Latency under about 150 ms one way for audio, or conversation turns into interruptions.
- Audio beats video. When bandwidth drops, keep voices clear and let pictures degrade.
- Adapt to every participant. One person on a weak connection must not lower quality for the rest.
- Meetings are short-lived and local. A meeting exists for an hour, with participants mostly in a few regions, so state can live in memory near them.
- Security. Meetings need authentication, encrypted media and protection from uninvited joiners.
Estimate the scale
Assume 100 million daily participants. Each joins 2 meetings a day, for 45 minutes each.
Joins: 100M × 2 = 200 million a day, which is 2,300 per second on average. The control plane is small.
Concurrency: 100M × 2 × 45 min = 9 billion participant-minutes a day. If 55% fall in an 8-hour (480 minute) workday window, concurrency at peak is 9B × 0.55 ÷ 480 ≈ 10 million simultaneous participants.
Bandwidth: each participant uploads about 1.5 Mbps (a few simulcast layers of one camera plus audio), so ingress to media servers is 10M × 1.5 Mbps = 15 Tbps. Each downloads about 2 Mbps (several visible tiles at reduced quality), so egress is 20 Tbps.
Media servers: if a server forwards about 10 Gbps, 20 Tbps of egress needs 2,000 servers at full load, and about 4,000 with headroom. Compare to the control plane, which needs a few dozen.
Mesh for comparison: in a 10-person meeting where every client sends its video to the 9 others at 1 Mbps, each uplink needs 9 Mbps. That is more than most home connections, and each meeting costs the clients 90 streams.
"2,300 joins a second is nothing. 35 Tbps of media across 4,000 servers is everything. The design question is how many copies of each stream exist and who makes them: if the client makes them, uplinks break. If the server decodes and re-encodes everyone, CPU breaks. The server should only forward."
The capacity estimator gives the join rate and about 37 TB a year of meeting and quality records. The media volume you size by hand.
API and data model
Signaling uses HTTPS and a WebSocket. Media uses WebRTC-style transport over UDP.
POST /v1/meetings { title, startsAt } -> { meetingId, joinUrl }
POST /v1/meetings/{id}/join { sdpOffer, capabilities } -> { sdpAnswer, mediaServer, iceServers[] }
WS signaling: mute, layout, raise-hand, subscribe(streamIds), quality hints
UDP RTP/SRTP packets (audio, video layers) <-> media servermeetings (meeting_id PK, host_id, starts_at, settings)
rooms Redis: meeting_id -> { mediaServer, participants[], streams[] } (TTL, live state)
quality (meeting_id PK, ts CK, participant, loss, jitter, rtt) (time series)
recordings object storage: meeting_id/part-nThe non-obvious choice: room state is soft state in memory on the media server that hosts the room, mirrored to Redis for lookup. If a server is lost, the meeting is rebuilt on another one from the participant list within seconds, because nothing in it needs to be durable.
High-level design
We simulate the control plane, since media packets are not requests: participants connect to a signaling gateway, a meeting service assigns each meeting to a media server and tracks the roster, and records go to a database.
- The signaling gateway holds a WebSocket per participant for joins, mutes and layout changes.
- The meeting service assigns each meeting to a media server and keeps room state in Redis.
Describe this diagram
Components
- participants (Client)
- signaling gateway (WebSocket gateway)
- meeting service (Service)
- room state (Redis)
- meeting records (PostgreSQL)
Connections
- participants sends to signaling gateway
- signaling gateway sends to meeting service
- meeting service sends to room state
- meeting service sends to meeting records
Run it, then try raising the join rate or cutting the signaling gateway's capacity. A burst of joins at the top of the hour is the pattern to watch.
The join path: the client contacts the meeting service, which picks a media server near the first participants, returns its address and ICE candidates, and the client sets up an encrypted UDP session to that server. Everyone joining the same meeting is directed to the same server.
The media path: each client sends its audio and video to the server, which forwards selected streams to each other participant. Signaling never touches media.
The control path: mute, layout and subscription changes travel on the WebSocket and update the room.
The interesting problem: how media flows between participants
With N participants, there are three well-known topologies.
Approach A: peer-to-peer mesh
Every client sends its streams directly to every other client.
Good: no media servers, and the lowest possible latency for two people.
Bad: uplink and encode cost grow with N. At N = 10, each client encodes and uploads 9 copies. It works for two or three people, and falls apart soon after.
Approach B: MCU (multipoint control unit)
The server receives everyone's stream, decodes them, composes one mixed video and audio feed, re-encodes it and sends one stream to each participant.
Good: every client uploads one stream and downloads one. It works on weak devices and bad links.
Bad: the server decodes and encodes video for every participant, so CPU cost is large and per-participant. Composition adds delay and gives clients no control over layout.
Approach C: SFU (selective forwarding unit) with simulcast
Each client uploads one stream, or a few copies of it at different quality (simulcast: for example 720p, 360p and 180p). The server does not decode anything. It forwards packets, choosing for each receiver which layer to send, based on that receiver's bandwidth and on what it is showing. The active speaker gets the high layer, small tiles get the low one.
Good: the server's work is copying and routing packets, which is cheap, so one machine handles thousands of participants. Each receiver gets a quality fit to its own network, and the uploader sends only 1.5 Mbps total.
Bad: receivers decode several streams, so devices need more CPU than under an MCU. The server needs good estimates of each downlink to pick layers well.
The recommended design is C. The key sentence: forward, don't decode. The server never touches video content, which also allows end-to-end encryption between participants as an option, at the cost of server-side features like cloud transcription.
Transport, loss and global meetings
Use UDP with application-level recovery. Retransmitting a lost video packet usually arrives too late to show. For audio, send small redundant copies (forward error correction) so a lost packet can be rebuilt without waiting. For video, request a retransmission only if time allows, otherwise ask for a keyframe. A short jitter buffer on the receiver smooths arrival times at the cost of a few tens of milliseconds.
Estimate bandwidth continuously. Congestion control watches delay trends and loss, and tells the sender to switch simulcast layers up or down, quickly. Protect audio first.
NAT traversal. Most clients sit behind NAT. The client and server exchange candidate addresses (ICE) through a STUN server to find a direct path. For some networks, typically a minority, only a TURN relay works, which carries the media through a server. Size TURN capacity for those users, and offer a TCP-over-443 fallback for networks that block UDP.
Global meetings. If participants are in Europe and Asia, forcing everyone to one server adds long round trips for someone. Place a media server in each region and cascade them: each region's SFU forwards one copy of each stream to the other regions over the backbone, rather than every remote participant pulling separately.
Bottlenecks and failures
A media server dies mid-meeting. All its rooms drop. Clients detect packet silence within seconds, ask the meeting service for a new server and rejoin with an ICE restart. Because room state is a participant list, the meeting resumes on a new host in a few seconds.
The top-of-the-hour surge. Millions join at 9:00 and 9:30. Signaling must absorb a burst of joins, so keep join handling stateless and horizontally scalable, pre-warm media capacity before the hour and rate-limit retries with jitter.
One participant with a bad link. With simulcast, the SFU gives that receiver a low layer and sends nothing extra to anyone else. Never let the weakest link set the quality for the room.
Uninvited joiners. Require authentication or a waiting room, use unguessable meeting IDs and passcodes, and let the host lock the meeting. Encrypt media between client and server at minimum.
What if the recording service is down? The meeting continues. Recording consumes a copy of the forwarded streams, so keep it off the live path and buffer to disk, so a recorder failure never affects participants.
Very large meetings. An SFU can forward to hundreds of people, but a thousand-viewer webinar should switch most viewers to a one-way delivery mode (see Design Twitch) and keep only the speakers on the interactive path.
Trade-offs to name aloud
- SFU over MCU: cheap servers and per-receiver quality, but more decode work on clients.
- UDP over TCP: lower delay and graceful loss, but you build recovery, congestion control and a TCP fallback.
- Soft room state: fast failover with no database writes in the media path, and nothing survives a total loss of the server.
- End-to-end encryption: stronger privacy, and it rules out server-side recording, transcription and some layout features.
What interviewers listen for
- A working answer: signaling over WebSockets, media over WebRTC, servers that relay audio and video, and a database for meetings.
- A strong answer: compares mesh, MCU and SFU with numbers, chooses SFU with simulcast, chooses UDP with reasons, and routes each meeting to one server.
- A standout answer: also covers NAT traversal and TURN capacity, bandwidth estimation and layer switching, cascading across regions, meeting failover with soft state, join surges, and the cost of end-to-end encryption.
Check your understanding
Common mistakes
Choosing a topology without numbers. "Use an SFU" is a claim. "Mesh needs nine uplink copies, an MCU needs a decode per participant, an SFU needs neither" is an argument.
Load-balancing packets. All media for a meeting needs one server. Load balance when assigning meetings, not per packet.
Forgetting NAT traversal. A design that ignores STUN and TURN fails for a meaningful part of real users.
Letting the weakest link set quality. Per-receiver layer selection is the main reason SFUs work.
Practice
A meeting of 8 people has one participant on a mobile network whose bandwidth swings between 3 Mbps and 300 kbps. What should the system do, and what should the others notice?
Write your own answer first, on paper or in a note. Then compare.
Show a hint
Think about which side of the SFU reacts, and how quickly it can change layers.
Show a strong answer
Estimate the downlink continuously. The SFU measures delay and loss on that participant's downlink. When estimated bandwidth falls to 300 kbps, it switches that participant to the lowest layer for the tiles on screen, and protects audio, which needs only a few tens of kbps.
Keep the others unaffected. Nobody else changes: the uploaders keep sending all layers, and the SFU only decides what to forward to each receiver. The weak participant's own uplink is limited too, so the client reduces its upload layers, and the SFU simply forwards less.
Switch up slowly and down quickly. Move down on the first sign of congestion, and move up only after bandwidth has stayed good for several seconds. Otherwise the picture oscillates.
The pattern worth keeping: adapt per receiver on the server, down fast and up slow, and always protect audio first.
Participants in Mumbai, Frankfurt and Virginia join one meeting. A single server in Frankfurt gives Virginia 90 ms of latency each way. How would you improve it?
Write your own answer first, on paper or in a note. Then compare.
Show a hint
Consider adding servers and what travels between them.
Show a strong answer
Add a media server in each region and cascade them. Participants connect to the nearest server, which adds only a short last-mile hop. The servers forward streams to each other over the provider's backbone, which is faster and more stable than the public internet.
Send one copy per stream between regions. If Virginia has 4 participants, Frankfurt's server sends each stream across once, and Virginia's server fans out locally. Inter-region traffic grows with the number of streams, not with the number of viewers.
Pick the layers across links too. Between regions forward only the layers someone in the destination region needs, which saves backbone capacity.
Handle the extra failure case. If the link between two regions degrades, participants on each side still talk locally, and the cascade reconnects over another path.
The pattern worth keeping: put the fan-out as close as possible to the receivers, and send a single copy across the long link.
Key takeaways
- Separate signaling from media. Signaling is ordinary web scale, and media is where the capacity goes.
- Use an SFU: forward packets, never decode, and let simulcast give each receiver its own quality.
- Choose UDP, recover from loss without waiting, and protect audio first.
- Route a meeting to one server, and cascade regional servers for global meetings.
- Plan NAT traversal and TURN capacity, and keep room state soft for fast failover.
- Size by bandwidth: about 35 Tbps needs thousands of media servers.
Further reading
- H. Schulzrinne et al., RFC 3550 "RTP: A Transport Protocol for Real-Time Applications" (2003): sequence numbers, timestamps and jitter reporting.
- M. Westerlund and S. Wenger, RFC 7667 "RTP Topologies" (2015): mesh, mixer and selective forwarding unit designs.
- W3C, "WebRTC 1.0: Real-Time Communication Between Browsers" (Recommendation, 2021): the browser API for peer connections and ICE.