HN Simulatornew | past | comments | lists | submit | ahachete's commentslogin

If you want an OSS sharded Postgres, just use Citus. Feature-full, proven, mature, boring.


its not feature-full. like schema changes locking, coordinator node..

Maybe I am wrong, but I am yet to read stories on operating tens of TB scale workloads on citus.


Most Citus workloads were 10s of TB with largest at around a few PB or so. Heap was a couple PB, back then, if I remember correctly. It is a brilliant piece of technology that supported mission critical workloads across mid/late stage startups to huge enterprises. The planner/executor are very advanced supporting a multitude of features and decade of intricate effort.

The biggest problem of Citus was migration effort, transition from single node to multi-node was not trivial. Here I’m not talking about single table use-cases, more classic relational, multi-tenant apps with 100s to 1000s of tables. This is partly expected with most sharding technologies, though.

Sharing some insights based on my multiple years of experience working with Citus!

Here are few customer use-cases I could found:

https://docs.citusdata.com/en/v10.0/get_started/what_is_citu...

https://info.citusdata.com/rs/235-CNE-301/images/Citus_Data_...?

https://www.youtube.com/watch?v=F6df3HV6kP0


> schema changes locking

Schema changes need locking... everywhere. Citus is no different. And they need proper design everywhere. If you mean that it requires distributed transactions, well, yes, again: expected and solved. Not even all sharding solutions support this.

> coordinator node

Not sure what the problem is here. If what you mean is that a single coordinator, even with an HA replica, can saturate, that's true, but you can add multiple "query routers" (that's our name in StackGres, see [1]).

> Maybe I am wrong, but I am yet to read stories on operating tens of TB scale workloads on citus.

For example, we have a customer that ingests some 30TB/day, and it's ramping up towards 200TB/day of ingestion. On 24 worker nodes.

[1]: https://stackgres.io/doc/latest/administration/sharded-clust...


But it's not really accurate:

> This adds some undesirable side effects, however. First, the coordinator becomes the bottleneck.

Apart from being able to use any node as a coordinator (and you can load balance them to avoid having "multiple connection strings), there's a new pattern which effectively allows you to have as many coordinators as you want. They are effectively "data-less" nodes. We have devised and implemented this pattern in StackGres [1].

> Adding a shard with more resources for a noisy tenant, or many small shards for a wide shard space requires substantial manual configuration of not only the database servers themselves, but wiring them up together with Citus.

Adding nodes (infrastructure) is what operators solve. In StackGres, adding new nodes means editing one/two characters from your YAML file: the integer number that represents the number of workers that you have.

Shard rebalancing is fully built-into Citus as a UDF, which you can call (manually or in an automated manner) over Postgres protocol.

> Managing backups is also external to Citus, so operators still need to build the proper infrastructure

Agreed, but it's also solved (see distributed backups in StackGres [2]).

> PgDog is a spiritual successor to PgCat, both of which improve on Citus's architecture substantially.

Unsubstantiated why. I assume it's because of the assumption that a proxy model is superior than Citus. To which I have to say that Citus model is also a proxy model, where the proxy just happens to be Postgres, which unsurprisingly, speaks Postgres protocol. Sure, there are nuances that we could debate in this area and we can say that Citus is not a "pure proxy", but that doesn't lead to concluding that a proxy model is better --it's arguably not.

[1]: https://stackgres.io/doc/latest/administration/sharded-clust...

[2]: https://stackgres.io/doc/latest/administration/sharded-clust...


Good job, Colin.

I see you are following the Dyna53 [1] steps ;) What a school of thought you have sparked, Corey!

[1]: https://dyna53.io/


Same here. Stopped reading.


I feel ya. I'm always middle clicking twice, story and comments.

This shouldn't be a script (no offense, great job!). It should be built into the browsers!



Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: