
How Discord Stores Trillions of Messages - A deep dive
The Backend Engineering Show with Hussein Nasser
00:00
You You ID Is a Snowflake
Every ID we use is a snowflake. So if you generate random messages they have no relation to each other and as a result the database will not sort them properly. The ul idea looks a clear Prosser looks so graphically sorted Go ads That is used now by Shopify and I covered that that it gives you like an ordered Less that are unique you you ID is beautiful. In Cassandra all messages for a given channel and bucket Bucket will be stored together and Replicated across three nodes. Every if every message within the same channel and bucket if you send all our messages in the same time window All of these nice messages will go to the same No, it's effectively effective.
Transcript
Play full episode