Citus

Citus is an open-source PostgreSQL extension that transforms a single Postgres instance into a distributed database, enabling horizontal scaling through transparent sharding and parallelized query execution across clusters.

Reviewed by 7wData

On this page

Publisher review

Citus is an open-source PostgreSQL extension that transforms a single Postgres instance into a distributed database, enabling horizontal scaling through transparent sharding and parallelized query execution across clusters. Acquired by Microsoft in 2019, Citus remains fully free under the AGPL v3 license and maintains compatibility with standard PostgreSQL tools, drivers, and extensions. The extension applies native data distribution—by tenant, region, time, or custom logic—and coordinates queries across nodes without requiring application rewrites for simple schema-based scenarios.

Citus excels at multi-tenant SaaS applications (sharding by tenant ID), real-time analytics dashboards with sub-second responses, and microservices architectures. It supports both transactional and analytical workloads simultaneously and includes distributed transaction guarantees that matter to SaaS vendors. Citus 14 (released February 2026) brings PostgreSQL 18 support.

The trade-off is architectural: it requires deliberate sharding strategy decisions upfront and joins across shards incur network cost. Cross-shard queries work but penalty varies with shard layout. The coordinator-worker topology means the coordinator node can become a bottleneck in some patterns; high-availability modes mitigate this but add complexity.

Community usage spans from small SaaS teams to larger platforms (Vizor Games, for instance, handles 100GB daily on bare metal). Azure offers managed Citus via Azure Cosmos DB for PostgreSQL (though that service is entering retirement; Azure Database for PostgreSQL Elastic Clusters now hosts Citus as the recommended path). The open-source version requires self-management of coordinator failover and cluster topology.

Get the AI & data signal, daily.

335k+ subscribers read this every morning. One email, both newsletters. Unsubscribe anytime.

How it works

  1. Distributed sharding engine

    Automatically distributes data across cluster nodes by tenant ID, region, timestamp, or custom keys; queries route transparently to relevant nodes without application changes for single-shard access patterns.

  2. Parallel query execution

    Parallelizes SQL queries across multiple CPU cores and nodes simultaneously, delivering order-of-magnitude speedup on large analytical scans and complex aggregations compared to single-node PostgreSQL.

  3. Multi-tenant isolation

    Enforces data co-location at the tenant level; all tenant data lives on one shard, enabling fast local joins and transactional consistency without network round-trips.

  4. Distributed transactions

    Provides ACID guarantees across multiple nodes, critical for SaaS platforms where referential integrity and consistency matter; coordinates writes and reads globally.

  5. PostgreSQL ecosystem compatibility

    Works with existing Postgres extensions (PostGIS, pg_stat_statements, etc.), native drivers, and tools; no vendor lock-in or special client libraries required.

  6. Columnar storage option

    Stores data in columnar format for compression and vectorized scans on analytics workloads; reduces storage footprint and accelerates aggregation queries.

  7. Reference tables and distributed joins

    Replicates small lookup tables to all nodes, enabling efficient joins with sharded tables; balances network cost against data locality.

Strengths and trade-offs

Strengths

  • Stays synchronized with PostgreSQL releases as an extension rather than a fork; inherits Postgres maturity, extensions, and SQL completeness.
  • Transparent to applications for single-shard workloads; minimal schema changes required compared to dedicated distributed databases.
  • ACID transactions across shards with referential integrity, critical edge over pure analytical databases (Snowflake, BigQuery) for SaaS.
  • Proven production scale: sub-second analytics on 100GB+ datasets; real-world deployments from early-stage SaaS to platforms with millions of tenants.

Trade-offs

  • Sharding strategy is permanent; choosing the wrong shard key (e.g., by purchase ID instead of tenant ID in SaaS) creates difficult cross-shard join penalties that are hard to recover from.
  • Coordinator node single point of failure in basic topologies; HA modes double resource costs and complexity; Azure-managed versions mitigate this but lock you into cloud provider.
  • Cross-shard joins and queries incur network latency and require distributed query planning overhead; not a replacement for analytical data warehouses when questions span arbitrary dimensions.

Pricing context

Citus is open-source and free to download and self-manage under AGPL v3. No licensing fees. Azure Cosmos DB for PostgreSQL (managed Citus on Azure) bills on a per-minute basis with a one-hour minimum, charged by coordinator and worker node vCore count and region; reserved capacity discounts available for one- or three-year commitments.

Citus Cloud (managed service by Citus Data) also bills per-minute consumption based on cluster size and uses a calculator for custom configurations; exact pricing not publicly listed without configuring a test cluster. Self-managed deployments incur only infrastructure costs (compute, storage, networking).

Alternatives

User reviews

No user reviews yet. Be the first to write one.

Sources

Reporting on this tool draws on these publicly available sources.

  1. www.citusdata.com — Product overview, features, deployment options, and company ownership (Microsoft)
  2. github.com — Open-source status, AGPL v3 license, release history (Citus 14 February 2026), code composition (C, PLpgSQL, Python), and active development
  3. www.citusdata.com — Citus 13 release for PostgreSQL 17 support and recent development timeline
  4. www.citusdata.com — Use cases (multi-tenant SaaS, analytics, microservices), limitations of cross-shard queries, transaction guarantees, and compatibility with PostgreSQL ecosystem
  5. learn.microsoft.com — Azure Cosmos DB for PostgreSQL pricing (per-minute billing by vCore and region), reserved capacity options, and retirement notice recommending Azure Database for PostgreSQL Elastic Clusters
  6. news.ycombinator.com — Production user experience: quirks, schema rethinking, distributed query trade-offs, and real-world deployments
  7. learn.microsoft.com — Vizor Games case study: 100GB daily data ingestion, real-time analytics on bare metal, use of Citus JSON features
  8. www.citusdata.com — Citus founding year (2011), Microsoft acquisition date (January 24, 2019), and open-source transition (March 2016)