Live data from Hacker News

How Discord Stores Billions of Messages (2017)

blog.discord.com

141–150 of 377 posts

Re: How Discord Stores Billions of Messages (2017)

#141
post #82

Earlier quoted context omitted.

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.

I can't think of many reasons Discord "ate the whole market" besides smart marketing, honestly. It does audio rooms incredibly well, but everything else (even their developer support team) is just terrible.

Slack was/is pretty terrible too. Having every workspace require a new user is the pinnacle of idiocy. So annoying and even worse if you have different emails for different workspaces.

Re: How Discord Stores Billions of Messages (2017)

#142

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…

If you had to do it again, what would you choose instead?

These days? Redshift or B̶i̶g̶Q̶u̶e̶r̶y̶ BigTable (thanks for correcting my think-o!). Back then? Maybe HBase.

Re: How Discord Stores Billions of Messages (2017)

#143

TFA states: > we knew we were not going to use MongoDB sharding because it is complicated to use and not known for stability But then goes on to describe using Cassandra and overcoming sharding and stability issues. I.e., changing the key, changing TTL knobs, adding anti-entropy sweepers, and considering switching to a different cassandra impl entirely. Are these issues significantly harder to solve in MongoDB than C…

At the time MongoDB's sharding story wasn't great. They've gotten better since, but still have a primary-replica set model that has a single point of failure/failover. Cassandra (and Scylla) are leaderless, peer-to-peer clustering. Any node can go offline and the cluster keeps humming. Cassandra shards per node. Scylla goes beyond that and shards per core. Cassandra and Scylla also use hinted handoffs so if a node is…

MongoDB has the equivalent of hinted handoffs. Changes are streamed to secondary nodes via the oplog, and the secondary just resumes where it was once it is back online. There is a limit to how long it can be offline (based on the size of the oplog), but that is the same limitation as hinted handoffs.

Re: How Discord Stores Billions of Messages (2017)

#144
post #126

Earlier quoted context omitted.

I believe it was this one: https://discord.com/jobs/4004051002 I see a couple of Storage Engineer job links below, I should apply to one of those too... :)

Ah yeah, just tested it and it says "IF APPLICABLE, WOULD YOU BE WILLING TO RELOCATE TO DISCORD'S SF HQ? WHILE DISCORD IS EMBRACING A HYBRID REMOTE APPROACH GOING FORWARD, SOME ROLES WILL REMAIN HQ-BASED." It is not applicable for that role. It is not applicable for most (maybe all) engineering roles.

Yep that is it!

Re: How Discord Stores Billions of Messages (2017)

#145

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.

Re: How Discord Stores Billions of Messages (2017)

#146

Earlier quoted context omitted.

It's free for the same reason everything is free these days. VC funds anything that will attract a lot of users to mine data from so they can sell the data. Discord didn't do anything that was groundbreaking or even solve a problem that had no solution; they just came along during a time when investors are willing to fund a company operating at a loss for a decade until FANG buys them. Discord's a pretty good product…

Slack isn't free, they sell you history-in effect, you generate the data that they sell back to you.

Holding your data hostage until you pay up, isn't that ransomware?

Re: How Discord Stores Billions of Messages (2017)

#147
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.

The most frustrating thing is that somewhere on their website they mentioned that most people are not familiar with the Markdown syntax, so they chose not to use it. But instead they created their own syntax that even less people are familiar with...

Re: How Discord Stores Billions of Messages (2017)

#149
post #82

Earlier quoted context omitted.

I can't think of many reasons Discord "ate the whole market" besides smart marketing, honestly. It does audio rooms incredibly well, but everything else (even their developer support team) is just terrible.

Discord ate the market because it is free and good enough voice quality. Before that everyone was paying for voice server hosting or doing it themselves. Is that smart marketing or just the standard operating procedure for startups around that time?

I agree, but also worth mentioning that Discord really did Chatrooms correctly.

The ability to easily create servers, invite users to your server, and then make that server your homebase with its own channels and emojis, is pretty novel and perfectly fit into the gaming community which is basically a loosely connected graph of friend groups.

Re: How Discord Stores Billions of Messages (2017)

#150
post #56
post #53

Earlier quoted context omitted.

Why not messages?

Upstream blockers in scylla + its our biggest dataset, and is a quite large project.

:wave:

Do you use Cassandra for all your access patterns or do you use something else (elastic search or something) also?

I'm just curious as in my professional career I recently switched to platform engineering from full stack mobile/web software engineer.

Thanks!!!

Post reply on HN