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.
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:
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...