Voice chat is unforgiving. A web page can load half a second late and nobody notices. A voice call that stalls for half a second is immediately obvious, and a call that drops packets for several seconds is unusable. Discord has to deliver that experience to millions of people at the same time, across thousands of servers, in dozens of regions, on connections ranging from fiber to congested mobile networks. The architecture that makes it work is not one clever trick. It is a set of deliberate tradeoffs: use UDP instead of TCP, forward audio instead of mixing it centrally wherever possible, keep voice state separate from chat state, and push failure handling to the edge where it can be recovered quickly.
To understand the design, it helps to separate three problems that are often confused. First, how does a client find and join a voice channel? Second, how does audio move between participants with low latency?…