Skip to content

Design Discord's Message Storage/Playground

Storing trillions of chat messages

Click a part to change it, put something in front of it, or kill it. Turn the traffic up. Every number moves as you go; nothing is graded. About 120 million messages a day with reads roughly equal to writes; the peak and ten recipients per message are assumed.

Running
Traffic
CLIENTMembersSERVICEAPI serversSERVICEGatewaySERVICEMessagedata serviceDATABASEMessage cluster
Requests failing
0%
Backlog growing
none
Instances running
45

What goes through it

OperationOfferedOutcomeWaitUp
Messages sent4,170/sAll served109 ms99.999%
Message reads4,170/sAll served104 ms99.999%
Live deliveriesbackground42k/sKeeping up––

Wait is the expected time a caller waits; Up is the share of time every part it waits on is running.

What your changes did

Nothing yet. This is the reference design: change something to see what it buys and costs.

At this traffic

Everything is running within capacity.

Ask AI what your design does

AI

The numbers above come from a simple model. The AI reads your design, what you changed and these numbers, and explains where it holds and where it fails, citing how the engineers who built it did it. It can be wrong.