Re:How Discord Stores Billions of Messages (2017)
by jitans on Tuesday August 24, 2021 @05:26PM
(#28295196)
I would have used CockroachDB, it has all the requirements listed and you don't need to know in advance the queries you will perform when deciding the database schema.
[ Parent
| on HN ]
Re:How Discord Stores Billions of Messages (2017)
by PeterCorless on Tuesday August 24, 2021 @06:23PM
(#28295728)
This would not work at scale for a company like Discord, with its volume of traffic. Cockroach, being consistency-oriented would quickly become transaction-bound. You want a database like a Cassandra or Scylla that is more performance/availability oriented. Otherwise you are going to see a lot of lag and latency in the Discord chat.
Cockroach is very, very good for a distributed SQL database. But it's still performance-limited in its very nature.
More here on the difference between NoSQL/NewSQL performance, using Scylla (a CQL-workalike) as a point of comparison:
https://www.scylladb.com/2021/01/21/cockroachdb-vs-scylla-be...
Re:How Discord Stores Billions of Messages (2017)
by rnotaro on Tuesday August 24, 2021 @06:23PM
(#28295727)
On the day that this blog post was written, CockroachDB was only at beta-20170112 and didn't even had a production release yet.
v1.0 was released on May 10, 2017 [1], so I doubt it was even on their mind when they started working on the project.
Re:How Discord Stores Billions of Messages (2017)
by PeterCorless on Tuesday August 24, 2021 @06:24PM
(#28295737)
Amazing. The whole industry has come quite a ways since 2017!