Citus
activeby Microsoft (Citus Data) · since 2016 · also known as Citus Data, Citus extension
Postgres extension that shards tables across nodes for multi-tenant SaaS and real-time analytics.
Overview
Citus is an open-source PostgreSQL extension, owned by Microsoft since 2019, that turns a group of Postgres servers into one distributed database. You mark tables as distributed (sharded by a column such as tenant_id) or reference (replicated everywhere), and the coordinator rewrites and parallelizes queries across worker nodes, with co-located joins and foreign keys within a shard group. Because it is an extension rather than a fork, it tracks new Postgres majors quickly and keeps the rest of the ecosystem usable. It also ships a columnar table access method. It works best for multi-tenant SaaS and high-ingest analytics; arbitrary cross-shard OLTP is not where it shines.
Strengths & trade-offs
Strengths
- +Extension, not a fork: supports new Postgres majors quickly and keeps extensions like PostGIS and pgvector
- +Tenant-based sharding with co-located joins and foreign keys
- +Schema-based sharding for schema-per-tenant apps
- +Parallel distributed queries speed up real-time analytics
- +Columnar access method for compressed analytical tables
Trade-offs
- −AGPL license deters some commercial embedding
- −Cross-shard joins on non-distribution columns can be slow or unsupported
- −Coordinator node can become a bottleneck without careful setup
- −Managed Azure Cosmos DB for PostgreSQL is being retired, leaving fewer hosted options
Great for
- +Multi-tenant B2B SaaS sharded by customer
- +Real-time analytics dashboards over event data
- +Time-series and IoT ingestion with rollups
- +Scaling an existing Postgres app without changing databases
Think twice for
- −Workloads with frequent arbitrary cross-shard transactions
- −Small databases that fit on one Postgres server
- −Multi-region active-active writes
Capabilities
Native or official first-party support · 16 of 25 tracked
Scale & consistency
- Comfortable data size
- Large · ≤ 1 PB
- Horizontal scaling
- Native
- Multi-region
- No
- Transactions
- Full ACID
- Consistency
- Strong
- Schema
- Strict
- Architecture
- Distributed, Client server
- Query languages
- SQL, PL/pgSQL
Hash- or schema-based sharding across workers with online shard rebalancing; HA relies on Postgres streaming replication per node.
Deployment
available on · Azure
Ecosystem
Alternatives to Citus
The extensible, standards-first open-source relational database.
citus vs postgresql →Apache-licensed distributed SQL that reuses the PostgreSQL query layer on a Raft-replicated storage engine.
citus vs yugabytedb →Postgres-wire distributed SQL built to survive node, zone and region failures with serializable transactions.
citus vs cockroachdb →Alpha-stage, Vitess-inspired sharding, pooling and HA layer for unmodified PostgreSQL, led by Supabase.
citus vs multigres →Fully open-source multi-master distributed PostgreSQL built on the Spock logical replication extension.
citus vs pgedge →PostgreSQL extension adding hypertables, columnar compression and continuous aggregates for time series.
citus vs timescaledb →Citus FAQ
What is Citus?
Citus is a relational database by Microsoft (Citus Data), first released in 2016. Citus is an open-source PostgreSQL extension, owned by Microsoft since 2019, that turns a group of Postgres servers into one distributed database. You mark tables as distributed (sharded by a column such as tenant_id) or reference (replicated everywhere), and the coordinator rewrites and parallelizes queries across worker nodes, with co-located joins and foreign keys within a shard group. Because it is an extension rather than a fork, it tracks new Postgres majors quickly and keeps the rest of the ecosystem usable. It also ships a columnar table access method. It works best for multi-tenant SaaS and high-ingest analytics; arbitrary cross-shard OLTP is not where it shines.
Is Citus open source?
Yes. Citus is open source. License: GNU AGPL v3.
Does Citus support ACID transactions?
Yes. Citus supports full ACID transactions, with strong consistency.
Does Citus scale horizontally?
Citus scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB).
How can I run Citus?
You can self-host it and use the vendor's managed cloud. Managed offerings include Elastic clusters in Azure Database for PostgreSQL. It is available on Azure.
What is Citus best for?
Citus is a strong fit for multi-tenant B2B SaaS sharded by customer; real-time analytics dashboards over event data; and time-series and IoT ingestion with rollups. Think twice for workloads with frequent arbitrary cross-shard transactions.
What are the best alternatives to Citus?
Common alternatives to Citus include PostgreSQL, YugabyteDB, CockroachDB, Multigres and pgEdge. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is Citus?
Citus ranks #144 of 844 databases on the WhichDB Score (21.1/100), and #46 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.



