News for hackers. Stuff that matters.

Ask HN: Has distributed SQL come of age?

At work we're exploring ways of scaling our database layer, ideally achieving horizontal scalability in both read and write throughput. A few years ago horizontal write scalability could only mean you either explicitly shard or adopt one of the distributed NoSQL key-value stores.

I've sat on the sidelines though as "distributed SQL" became a new category- first with Cloud Spanner, then with CockroachDb, TiDB, MariaDb XPand, etc. They promise near-linear horizontally scalability, atomic transactions across instances (required for us), real online schema changes, and a compliant SQL interface.

It seems almost too good to be true if you're already tied to relational databases, which we are. I never hear about real companies with massive scaling needs using them though. Are they mature enough to be trusted? Does anyone have real-world data about performance or reliability? The literature is sparse.

( 4 comments | 8 points | on HN )
Re:Ask HN: Has distributed SQL come of age? by simonw on Wednesday August 18, 2021 @04:57PM (#28227045)
It's definitely an interesting category right now - I've been following Citus and Vitess with interest for a while since they let you use PostgreSQL and MySQL respectfully with magic sharding sauce.

I haven't actually tried either yet - like you I'm waiting for more success stories (plus I don't currently have any problems that warrant that approach).

Slack adopted Vitess a few years ago.

Re:Ask HN: Has distributed SQL come of age? by nitsuaeekcm on Wednesday August 18, 2021 @06:36PM (#28228020)
Vitess and Citus seem to be half-way between manual sharding and distributed SQL. They really discourage cross-shard updates, for instance, whereas they're a really natural part of distributed SQL: > The authors of Vitess recommend that you design your VSchema so that cross-shard updates (and 2PC) are not required. https://vitess.io/docs/reference/features/two-phase-commit/

Maybe though it's just a fundamental coordination problem one can't work around.

Re:Ask HN: Has distributed SQL come of age? by simonw on Thursday August 19, 2021 @02:32AM (#28231012)
I'm very OK with that limitation - when I'm designing a sharded system I'm happy to take shards into account and arrange my entities such that I can apply updates to them grouped on a single shard.

The value I want is help directing those write queries to the correct shards, and some assistant with cross-shard read queries.

Re:Ask HN: Has distributed SQL come of age? by randomopining on Wednesday August 18, 2021 @09:19PM (#28229276)
Apache ignite does this