Live data from Hacker News

How Discord Stores Billions of Messages (2017)

blog.discord.com

181–190 of 377 posts

Re: How Discord Stores Billions of Messages (2017)

#181

We took a big bet on Cassandra, and then on an opinionated wrapper around Cassandra at $PASTJOB. The use case was a text search engine for syslog-type stuff. The product we built using Cassandra was widely known as our buggiest and least maintainable, and it died a merciful death after several years of being inflicted on customers. We didn't have a good handle on the exact perf implications of different values of rea…

We just benchmarked Cassandra 4.0, which is brand-spanking new.

The good news: C4.0 is a far better performing database than C3.11. The new GCs definitely get rid of the long tail latency nightmares:

https://www.scylladb.com/2021/08/19/cassandra-4-0-vs-cassand...

However, we also compared it to Scylla's latest release, and though C4 is better*, you can still find other CQL-compatible databases that outperform it. Especially around compactions and topology changes:

https://www.scylladb.com/2021/08/24/apache-cassandra-4-0-vs-...

Just published these numbers today.

Re: How Discord Stores Billions of Messages (2017)

#182

Earlier quoted context omitted.

Are you saying that one person, without consulting other engineers, or having to do any research, made this decision in less than a day? Because I have some bad news for you. The sentiment you express here is why interviewing is so shit these days.

Are you replying to the right comment?

They must be. Totally out of context response.

Re: How Discord Stores Billions of Messages (2017)

#183

We took a big bet on Cassandra, and then on an opinionated wrapper around Cassandra at $PASTJOB. The use case was a text search engine for syslog-type stuff. The product we built using Cassandra was widely known as our buggiest and least maintainable, and it died a merciful death after several years of being inflicted on customers. We didn't have a good handle on the exact perf implications of different values of rea…

I've used Cassandra at two companies, and had the exact same experience as you at the first company. At a much bigger company that had some very, very highly paid Cassandra DBAs it was actually a relatively smooth experience.

How much is very very high pay?

Re: How Discord Stores Billions of Messages (2017)

#184

oh great, here come the mongodb haters. I do use discord for a few groups, too bad they will not allow 3rd party clients because a discord terminal app similar to irssi would be awesome

MongoDB is great for developers. Very facile to get started. However, it tends to fall over when it hits scale — which could be in total data set size (like, >TB scale), transaction scale (>100k ops) or in low latencies (submillisecond to single-digit millisecond).

In any of those domains, if you are trying to solve your problem with MongoDB you are in for a world of hurt.

That's generally when people start looking at other options. Whether an in-memory system for pure speed, or a horizontally scalable system for raw size or throughput.

Re: How Discord Stores Billions of Messages (2017)

#185

Earlier quoted context omitted.

2017 is pretty antique though now: the scaling and the ecosystem change fast

I admittedly know very little about this space. What are some of the newer players?

Scylla, for one. Which is mentioned as a possible "next step" in the article.

Re: How Discord Stores Billions of Messages (2017)

#186

Discord had like $300M invested and they created unparalleled piece of software that ate whole market, damn. One of the most impressive softwares that I've seen and use after years of using ventrilo/mumble/teamspeak.

Honestly, I find discord super frustrating. Can't have multiple chats open at the same time, can't close the right rail, etc. It's UX is subpar in almost every way that matters to me. I use it because _everyone_ uses it, not because I want to.

You may enjoy Ripcord if you're not happy with Discord's UI. I've been using it for a few months, and it's made Discord enjoyable to use.

I do have to open the official client whenever I do voice calls though, because there's currently an issue that can cause incoming audio to sound terrible. But for text chat, it's great.

https://cancel.fm/ripcord/

Re: How Discord Stores Billions of Messages (2017)

#187

Nothing about any sort of encryption.

That's an interesting point too. They talk about not being a blob store, not wanting the serialisation cycle to hamper performance but makes you wonder how exactly they're storing the data. I'd guess it's not encrypted at all.

ETA: Going back to the original thread, the whole question of encryption seems to be dodged and that usually means the answer isn't the one people are looking for: https://news.ycombinator.com/item?id=13440921

Re: How Discord Stores Billions of Messages (2017)

#188
post #8

I'm curious of the 2021 measure of total disk space that Discord consumes. Servers that I'm in share images every few minutes, which must add up pretty quick.

Unique images or just copied from elsewhere?

How does that matter? Do they keep track of all images on the internet?

Re: How Discord Stores Billions of Messages (2017)

#189
post #86

Earlier quoted context omitted.

uh, how about the fact that vent/mumble/Skype were all awful?

I don't see how that's relevant? I don't even prefer those over Discord, but I don't think it's enough of an improvement to warrant the market share it has now.

What do you prefer?

The fact that you can:

(1) Find a server with a simple URL (no pw needed, no port or IP, etc.)

(2) Find your friends easily with a unique username and use chat as a fallback

(3) Create an audio room (that scales!) that has great audio quality (doesn't "drop" calls and

(4) Client that auto-updates to provide more and more features

All within a few minutes is a HUGE upgrade or Ventrilo.

This doesn't even mention the network effects, bot integration, gif/photo capability, etc. It's superior in almost every way possible.

Re: How Discord Stores Billions of Messages (2017)

#190
post #30

Earlier quoted context omitted.

I've also noticed that in a lot of tech-related social circles people are increasingly choosing Discord over Slack. That's a trend I totally didn't expect: at least until a few years ago it was clear that Discord was for gamers and Slack was for work and everyone else. That changed quickly. Impressive indeed!

Slack uses a language that is like markdown, but is not markdown, which is annoying for engineers. Slack does not support syntax highlighting of code blocks. Discord uses proper markdown and supports syntax highlighting. These are two things that make me think Discord is better specifically for engineers, aside from it just being generally way better.

That does seem bizarre. Was there some special reason for them introducing almost markdown but-not-quite as a feature?
Post reply on HN