Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 17 · System Design · Discord · about 25 min to read

Watch: The gateway: a process per user, and five million of them
▶ VideoPlay it as a journeyTutor comes with a plan

Discord, the case study

Boards

Everything
Everything · Open board

Every organ of Discord on one canvas. The eight boards before it draw those organs one at a time. This lesson is the story running through them, in the order the company hit each problem.

Before you start. You need one idea: a chat app must remember everything anyone ever typed, and must also hand what someone typed one second ago to everyone staring at that channel right now. One more: a database keeps an index beside your messages so it can find one without reading them all, and that index helps only while it fits in memory.

Lesson 84 of 115 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 2015: a game studio that could not hear itself play
  • November 2015: 100 million messages, and the index stopped fitting in memory
  • 2017: a guild, and one small program per person online
  • A million people ask the same question: coalescing
  • 2023: the Midjourney guild, and the relays that do the shouting
  • The videos
  • Retrieval (cold, no peeking)

Terms it explains: partition, buckets, gateway, guild, coalescing, relay, SFU.

Related paper

Review System Design