How Discord Stores Trillions of Messages (2024)

Discord engineers recently posted a description of their billion-message message storage system, which they started in 2017. When they migrated from MongoDB to 12 Cassandra nodes to store billions of messages, they had different problems, which were unpredictable. A server with small groups of friends tended to send a lot fewer messages than a server with hundreds of thousands of people. Additionally, they discovered that because readings in Cassandra require querying the memtable and on-disk files, they are far more expensive than writing.

Their solution was to migrate to ScyllaDB, a Cassandra-compatible database written in C++, which promises better performance and garbage collection. It is an open-source distributed NoSQL wide-column data store compatible with Apache Cassandra.

They started small but then decided to move all their databases. Nevertheless, despite all this, hot partitions-many concurrent reads on a server that causes latencies-persisted. They attempted to address the issue using data services between a ScyllaDB database cluster and their API monolith.

They used Rust to write data services, which gave them a C/C++ speed with thread and memory safety. In addition, these data services contain one gRPC endpoint per DB query, and if more users query the same data, the DB will be queried only once.

Ultimately, this prevented the DB from getting traffic spikes if someone sent a message to everyone on a large server. Their tail latencies improved

How Discord Stores Trillions of Messages (2024)
Top Articles
DHCP defined and how it works
Why you should have multiple crypto wallets
Kreme Delite Menu
Angela Babicz Leak
Froedtert Billing Phone Number
Www.politicser.com Pepperboy News
Www.craigslist Augusta Ga
Lycoming County Docket Sheets
Slapstick Sound Effect Crossword
Top Golf 3000 Clubs
Strange World Showtimes Near Amc Braintree 10
World of White Sturgeon Caviar: Origins, Taste & Culinary Uses
Craigslist Estate Sales Tucson
Taylor Swift Seating Chart Nashville
OpenXR support for IL-2 and DCS for Windows Mixed Reality VR headsets
Red Tomatoes Farmers Market Menu
Used Drum Kits Ebay
Snow Rider 3D Unblocked Wtf
Chastity Brainwash
Katherine Croan Ewald
25Cc To Tbsp
DBZ Dokkan Battle Full-Power Tier List [All Cards Ranked]
Kp Nurse Scholars
Little Caesars 92Nd And Pecos
CVS Near Me | Columbus, NE
Quadcitiesdaily
Sullivan County Image Mate
‘The Boogeyman’ Review: A Minor But Effectively Nerve-Jangling Stephen King Adaptation
Litter Robot 3 RED SOLID LIGHT
The Creator Showtimes Near R/C Gateway Theater 8
Craigslist Lake Charles
The 15 Best Sites to Watch Movies for Free (Legally!)
Motor Mounts
Little Caesars Saul Kleinfeld
Wow Quest Encroaching Heat
Moxfield Deck Builder
Sept Month Weather
Sas Majors
Courtney Roberson Rob Dyrdek
QVC hosts Carolyn Gracie, Dan Hughes among 400 laid off by network's parent company
22 Golden Rules for Fitness Beginners – Barnes Corner Fitness
Killer Intelligence Center Download
Jimmy John's Near Me Open
Union Supply Direct Wisconsin
Free Carnival-themed Google Slides & PowerPoint templates
Grace Charis Shagmag
Vrca File Converter
683 Job Calls
Craigslist Centre Alabama
Olay Holiday Gift Rebate.com
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 6614

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.