The interview problem
A video conference receiver has limited downlink bandwidth while several speakers publish multiple video layers. Design SFU forwarding that preserves audio and adapts without constant quality oscillation.
Original practice, not a reported company interview. All worked numbers are illustrative. Interview date: not applicable. Written October 3, 2026.
1. Scope and assumptions
Assume simulcast or scalable layers are available and decodable transitions are known. The SFU forwards encoded media; it need not transcode every stream. Reserve bandwidth for protocol overhead, audio and uncertainty.
2. Architecture and decisions
Receiver feedback → usable bandwidth estimate → priority allocation → layer-safe switch → forwarding → feedback
Assign priorities using visibility and active-speaker state, with explicit minimums and a maximum total budget. Reserve audio first. Choose feasible video layers under the remaining budget and apply hysteresis: downgrade quickly on sustained congestion, upgrade only with headroom and stable feedback. Request a keyframe or use an appropriate dependency point when a layer transition requires it.
Keep congestion estimation separate from application priorities. The application decides which tile matters; it cannot declare network capacity into existence. Bound keyframe requests so many receivers changing layers do not create a burst that worsens congestion. Slow or background clients should not force every receiver to the same quality.
3. Work through the example
From an estimated 2 Mbps downlink, reserve 20% as headroom, leaving 1.6 Mbps. Reserve 0.1 Mbps for audio and control, leaving 1.5 Mbps for video. One 0.8 Mbps active-speaker layer plus two 0.3 Mbps thumbnails totals 1.4 Mbps and fits; two 0.8 Mbps layers do not.
4. Failure cases and trade-offs
Using encoded average bitrate ignores keyframe bursts. Switching to a dependent layer without prerequisite frames causes corruption. Rapid bandwidth estimates can produce distracting quality flapping. Conservative headroom reduces resolution but protects continuity; measure the user-visible result rather than maximizing selected bitrate.
5. Validation and acceptance
Emulate bandwidth steps, loss, feedback delay and simultaneous speaker changes. Measure audio gaps, freeze duration, switch frequency and delivered quality. Confirm aggregate forwarded traffic respects the budget including bursts and retransmissions.
6. Follow-ups and self-review
How would screen sharing change priorities? Reward receiver-specific budgets, codec-aware switching, hysteresis and audio protection.
Sources and related practice
RFC 8836 describes congestion-control requirements for interactive media; this allocation policy is an original worked design.
Read the primary technical reference
Reference retrieved October 3, 2026. Retrieval date is not an interview or source publication date. The reference supports the named concept; scenario, architecture, examples and rubric are original.
Continue with Design a video streaming service; Design a live meeting transcription system.
Continue your preparation
Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.