Byte-Sized Design

Byte-Sized Design

Share this post

Byte-Sized Design
Byte-Sized Design
Breaking the limits of 10 million concurrent Discord users.

Breaking the limits of 10 million concurrent Discord users.

Discord has it under control

Byte-Sized Design's avatar
Byte-Sized Design
Dec 11, 2023
∙ Paid
11

Share this post

Byte-Sized Design
Byte-Sized Design
Breaking the limits of 10 million concurrent Discord users.
1
1
Share

⚡️TLDR;

Discord has a server with 10,000,000 concurrent users and keeps things under control by

  • Sending events only to people who actively check that server

  • Splitting work from a single process to multiple sub-processes

  • Being efficient with in memory databases

🔥 Too many users is a good problem. Fanning out is not.

The biggest issue Discord has for a server with 10,000,000 users is fanning out notifications to them.

When someone uses a call like “@everyone”, everyone in that humongous server is notified. That’s 10 million notifications in a single message!

🔧 Here’s the requirements

Coming straight from the official article:

Ensuring that we can keep almost all operations quick is important to the server feeling like it's responsive:

  1. When a message is sent, others should see it right away;

  2. When someone joins a voice channel, they should be able to start participating right away.

Dropping the “@everyone” command isn’t an option so we need to figure other ways to make it work.

👏 Optimization #1: Do less fam

The simplest way to handle to much throughput is to put less through

Before doing crazy technical solutions, Discord figured out if how much fanning out it actually needed to do.

Turns out not everyone is active in every server at all times of the day.

So their first optimization was to just send notifications when someone peeked into that server. Lazy loading the notification was a huge first step.

How good was this optimization?

Keep reading with a 7-day free trial

Subscribe to Byte-Sized Design to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Byte-Sized Design
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share