plasticwooddecking

Storing trillions of your Discord messages is waaaaay harder than you thought

Published: January 01, 0001 | Author: A.I. Nexus | Category: Financial Strategy

In this age of utterly ubiquitous connectivity, it's easy to forget that enabling it all is actually, you know, hard. Enter Discord, the voice, video and text chat app, and its tale of toil when it comes to storing and retrieving the trillions of messages its users generate.

The specifics of the company's struggles have been outlined in forensic detail in , a senior software engineer for the platform. 

On big public Discord servers, most of the the displayed messages are recent and cached which is good for performance. But smaller servers used by just a few friends can often involve old messages that aren't cached being displayed or read from the database every time [[link]] a user logs in.

According to numbers from 2019, Discord handled 25 billion messages per month.

According to numbers from 2019, , 850 million every day, and 600,000 per minute. You can expect those numbers to be even bigger now.

Discord started off using the MongoDB database to support this activity, but then moved to Cassandra. Its appeal was as a NoSQL database that had support for clustering, which means you can have multiple instances of a given database working as one to improve performance.

Both Apple and Netflix, among other big tech companies, both reportedly use Cassandra. So, it's got proper blue chip cred. Surely it's good enough for Discord? Initially, yes. Once Discord had ironed out a few issues, the Cassandra databases were writing new messages within one millisecond and read back old messages to users in five milliseconds. Quick enough for your typical text [[link]] chat, that's for sure.

But the good times didn't last. Discord now has something in the region of 150 million monthly active users. By early 2022, Discord was running rummy modern 177 Cassandra nodes storing trillions of messages.

The result was hotspots within the database when users interacted with Discord servers in certain patterns. The upshot is latency as the server falls ever further behind with user queries—in other words, users sending and reading text messages.

[[link]] Discord DB

The NoSQL bone is connected to the Channel ID bone. (Image credit: Discord)

The way that Cassandra marks data for deletion before eventually removing it via garbage collection routines also added dramatically to latency when reading messages. In really rough layman's terms, the tombstones marking the location of data marked for eventual deletion slowed down the process of getting at actual live data for reading.

The solution for Discord is another extremely difficult migration to a new database, known as ScyllaDB. It has several advangtages, including being written in C++, which is much faster than the Java coding language used by Cassandra. It's also Cassandra-compatible and also rummy nabob deletes data directly rather than using a garbage collector.

Your next upgrade

(Image credit: Future)

: The top chips from Intel and AMD
: The right boards
: Your perfect pixel-pusher awaits
: Get into the game ahead of the rest

Anyway, the switch over to ScyllaDB happened in May last year, and no doubt you didn't even notice when it happened. Which is a good thing. According to Bo, latencies are much improved compared to the tail end of the Cassandra implementation.

"It's been a quiet, well-behaved database (it's okay to say this because I'm not on-call this week). We're not having weekend-long firefights, nor are we juggling nodes in the cluster to attempt to preserve uptime. It's a much more efficient database—we're going from running 177 Cassandra nodes to just 72 ScyllaDB nodes," he says.

"Our tail latencies have also improved drastically. For example, fetching historical messages had a p99 of between 40-125ms on Cassandra, with ScyllaDB having a nice and chill 15ms p99 latency, and message insert performance going from 5-70ms p99 on Cassandra, to a steady 5ms p99 on ScyllaDB."

So, there you have it, the slightly-more-complicated-than-you-might-have-thought story of how to keep a message service from collapsing under the weight of millions of users. You can read about it all in much rummy noble more detail over on the .

DISCUSSION FEED (3)

GameMaster990

I wish there were more free spins available, but even with the current promotions, I have a lot of fun. The themed slot games are creative and engaging, keeping the gameplay fresh and entertaining every day.

SpinTiger17

Some games are a bit laggy on my phone at times, but the variety of games and the smooth desktop experience make up for it. Overall, the website offers a great gaming experience for both casual and serious players.

JackpotLion39

Customer support responded incredibly fast when I had an issue with my account. They were polite, professional, and solved my problem within minutes. It's reassuring to know that help is always available when needed.

RECOMMENDED READING

Here's the dystopian cooking simulator about frying up illegal eggs in Antarctica that you've always

Here's a weird new indie that has my undivided attention: Arctic Eggs, a game where you're in a miserable future seeking to escape [[link]] a dystopian prison with nothing but your wits, strong wrists, and a f...

Control 2 is an 'action RPG,' Remedy says, but unfortunately it doesn't explain what exactly that me

We don't know much about Control 2 except that [[link]] it's happening and will be self-published by Remedy rather than an external partner, as was the case with the original. But Remedy dropped an interesting...

Palworld has a Pokémon mod that lets you send beloved mascot Pikachu to the mines, and it's already

Update, January 23: This story was posted January 22. In it, I theorise about whether Nintendo will take legal action against this Palworld mod—as it has with similar projects in [[link]] the past. It's been l...

INTELLIGENCE NETWORK

สล็อต สล็อต สล็อต p31 เครดิตฟรี 188 u31.com เข้าสู่ระบบ u31 เครดิตฟรี 31 บาท winner55 ww winner55 สมัคร winner55 เครดิตฟรี​ winner55 ทางเข้า สล็อต​ winner55 com เพื่อ เข้า ระบบ ค่ะ สมัคร winner55 เครดิต ฟรี 188 ทางเข้า winner55 ผ่านโทรศัพท์มือถือ​ Yono all app all yono app go rummy holy rummy royally rummy rummy 365 rummy 51 rummy best rummy golds rummy mars rummy master rummy modern rummy nabob rummy noble rummy satta rummy star rummy wealth rummy win yono all app yono apk yono arcade yono business sbi yono business rummy meet joy rummy rummy new app rummy nobel rummy royal Yono all app Yono all app Yono all app Yono all app Sex Dolls Sale Sexpuppen Kaufen Bambola del Sesso สล็อตฟรี สล็อตฟรี ทดลองเล่นสล็อตฟรี โปรโมชั่นสล็อต U31 com h25 com สล็อต m358 เครดิตฟรี 188 w69 slot เครดิตฟรี 188 บาท pxj เข้าสู่ระบบ winner55 ทางเข้า สล็อต l86.com สล็อต pg168 ทางเข้า ทางเข้า w88 ใหม่ ล่าสุด bk8สล็อตฟรี PIGSPIN เครดิตฟรี 100 huc99สล็อตฟรี dafabet mc888 riches888pg jinda44 e19 betdog sbfplay ufa747 pay69 slot ดาวน์โหลด ufa888 riches777 g2g1bet PG SLOT PG SLOT PG SLOT pg slot สล็อต สล็อต สล็อต U31 Gaming สล็อต สล็อต สล็อต h25 สล็อต สล็อต u31 h25 u31 H25 h25 com สล็อต​ h25 com เข้าสู่ระบบ​ h25 com สล็อต​ h25 com เข้าสู่ระบบ​ u31 game เข้าสู่ระบบ u31 เครดิตฟรี 188 u31 เข้าสู่ระบบ w69 w69 slot ทาง เข้า​ w69 slot ทางเข้า​ w69 slot เครดิตฟรี 188 บาท​ w69 เข้าสู่ระบบ​ h25 com สล็อต​ H25 สล็อต winner55 u31 u31 com u31.com เข้าสู่ระบบ​ สมัคร winner55 เครดิตฟรี​ w69 slot ทาง เข้า yono all app yono all app yono all app yono all app yono all app yono all app yono all app w69 slot winner55 H25 com สล็อต H25 com สล็อต w69 slot w69 w69 slot winner55 winner55 slot u31 com u31 com เข้าสู่ระบบ​ u31 gaming u31.com เข้าสู่ระบบ u31 ทางเข้า u31 เข้าสู่ระบบ ทางเข้า winner55 ผ่านโทรศัพท์ มือ ถือ winner55 ทางเข้า สล็อต Yono all app Yono all rummy yono app yono sbi u31 com pg slot demo