InterviewLegend

Design Voice Infrastructure

Frequently asked
Alex Chen40 min readUpdated 327 real interview reports

A voice channel is a room that lives inside a Discord server (Discord calls a server a guild internally) which users click into to talk in real time. Text can tolerate a little delay and rides the persistent gateway connection every client already holds. Voice needs its own path, built for the strictest constraint in the product: your voice has to reach the others fast enough that a conversation feels natural. That path is built on WebRTC, the browser and native standard for real-time audio and video. Its heart is a server component called an SFU, a selective forwarding unit, which takes each speaker's audio and forwards it to everyone else in the channel. No other loop in the course can lead with this shape, so treat it as the signature real-time design.

The whole job sits between a person speaking and everyone else in the channel hearing them, over the public internet, with little enough delay that nobody starts talking over anybody. Two properties make it different from message delivery. First, the data is a continuous media stream, not discrete events, so it is measured in kilobits per second and milliseconds of delay rather than messages per second. Second, a late packet is worthless. By the time you could resend a dropped chunk of audio, its moment has passed, so voice runs on an unreliable transport and drops what arrives too late. Latency, the server topology that carries the streams, and region placement drive everything else.

The Discord angle
Voice stays off the gateway entirely, and you should say so first. Messages and presence run on the WebSocket fabric, while voice media runs on dedicated voice servers built around a homegrown C++ SFU. Discord has reported more than 2.6 million concurrent voice users at over 220 Gbps of egress, across hundreds of voice servers in more than a dozen regions. None of that traffic touches the message gateway. The client uses its always-on gateway connection only to coordinate joining a channel, then opens a separate connection straight to a regional voice server for the audio itself.
What's inside
  • 1 diagram
  • 5 sections
  • about 40 min

Premium lessonDiscord interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

Had your Discord interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Discord interview guide

Know what Discord asks before you walk in.

28 coding · 6 system design · 19 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.