Live data from Hacker News

How Discord Stores Billions of Messages (2017)

blog.discord.com

21–30 of 377 posts

Re: How Discord Stores Billions of Messages (2017)

#21

With privacy concerns, companies should be shamed for storing billions of messages.

> With privacy concerns, companies should be shamed for storing billions of messages.

should we shame ycombinator for storing the messages, accounts and comments on hacker news then?

I am still unable to delete my account here even though the CCPA and the GDPR exists. But here we are.

Re: How Discord Stores Billions of Messages (2017)

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

The Casssandra cluster mentioned (12 nodes, 1TB each) only handles text, as far as the article goes.

Re: How Discord Stores Billions of Messages (2017)

#24
I've used cassandra quite a bit and even I had to go back and figure out what this primary key means:

    ((channel_id, bucket), message_id)
The primary key consists of partition key + clustering columns, so this says that channel_id & bucket are the partition key, and message_id is the one and only clustering column (you can have more).

They also cite the most common cassandra mistake, which is not understanding that your partition key has to limit partition size to less than 300MB, and no surprise: They had to craft the "bucket" column as a function of message date-time because that's usually the only way to prevent a partition from eventually growing too large. Anyhow, this is incredibly important if you don't want to suffer a catastrophic failure months/years after you thought everything was good to go.

They didn't mention this part: Oh, I have to include all partition key columns in every query's "where" clause, so... I have to run as many queries as are needed for the time period of data I want to see, and stitch the results together... ugh... Yeah it's a little messy.

Re: How Discord Stores Billions of Messages (2017)

#25
post #23

Discord is so good. I just can't imagine it can stay this good forever. My fear is that eventually it will be bought out and aggressively monetized.

If you're paying for Discord every month, it's actually fairly expensive. A lot of the good features unlock once people start boosting servers with Nitros and those aren't cheap either. So I'd assume they aren't bleeding cash left and right on infra costs. They might actually breaking even on the infra costs at least.

Re: How Discord Stores Billions of Messages (2017)

#26

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.

Discord's smart move was emulating the concept of servers (including all the teenage drama coming from having administrators and moderators more interested in (ab)using their power than community building) while making them accessible to anyone without technical knowledge.

But it's important to remember that Discord is not that. Discord holds all your data, in luxurious detail, with no option to delete. They go as far as ignoring GDPR when people ask for their messages to be deleted. "Deleting" your account will not even anonymize your ID, it unsets your avatar, renames you, kicks you from all guilds and disables logging in. That's it. And if they ban you there is no place to move on to.

Re: How Discord Stores Billions of Messages (2017)

#27
post #19

Did they ever make it to ScyllaDB?

Yea. Everything but messages is on Scylla.

It's unfortunate Discord is still requiring relocation to SFO, the product is amazing and it looks like some awesome engineering behind the scenes that would be fun to work on!

Re: How Discord Stores Billions of Messages (2017)

#28

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.

Discord's smart move was emulating the concept of servers (including all the teenage drama coming from having administrators and moderators more interested in (ab)using their power than community building) while making them accessible to anyone without technical knowledge. But it's important to remember that Discord is not that. Discord holds all your data, in luxurious detail, with no option to delete. They go as fa…

and you aren't going to get DDoSed if you join server of not the nicest people :)

Re: How Discord Stores Billions of Messages (2017)

#29
post #23

Discord is so good. I just can't imagine it can stay this good forever. My fear is that eventually it will be bought out and aggressively monetized.

For years I've had a little bet going with friends about who ends up buying them to subsidize all this. My money was on amazon, because it could work so well with twitch + amazon prime.

Re: How Discord Stores Billions of Messages (2017)

#30

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.

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!
Post reply on HN