Also, CockroachDB is not yet suitable for:
Heavy analytics / OLAP"
I think Citus is actually very well suited for Heavy analytics / OLAP
Also, CockroachDB is not yet suitable for:
Heavy analytics / OLAP"
I think Citus is actually very well suited for Heavy analytics / OLAP
1. Analytical, but less data warehousing and more of a HTAP (hybrid transactional/analytical processing). In this case you're often ingesting a lot of data, often times sensor or log data from many endpoints, and then providing analytics across that data. The analytics needs to be up to date within minutes, and responsiveness of reports within seconds. You can see how Algolia (which powers the search for HN) uses Citus for this in their blog post - https://blog.algolia.com/building-real-time-analytics-apis/
2. Transactional. For a couple of years now Citus has had full transactional support when targeting a single node. Single node transactions can actually cover a breadth of use cases because it can span across tables as long as tables are co-located within the same node. We often see this is the case for multi-tenant/SaaS applications. In recent releases we also added support for distributed transactions. These transactions do have a higher overhead, but can often be hard to detangle from an existing application, thus us building support for distributed deadlock detection then adding distributed transactions.
Generally we're continuing to improve and support both of those use cases and have our usage base actually pretty evenly split between the two.
And yes, cockroach isn’t Postgres but it has SQL, versus something like Mongo or Cassandra.
Citus is best used when transactions don't cross shard boundaries, in which case they execute on a single node and give you the low-latency to match.
The part about 2PC still holds.
Spanner uses Paxos (consensus) for replication within a key range (shard), but two-phase commit across shards: https://ai.google/research/pubs/pub39966
Citus relies on PostgreSQL's streaming replication, which gives higher throughput than Paxos, but Paxos has better availability characteristics. On the other hand, Paxos with leader leases as used by Spanner is similar to streaming replication both in terms of performance characteristics and short downtime during failover.