DEV.co
Open-Source Databases · citusdata

citus

Citus is an open-source PostgreSQL extension that distributes data and queries across multiple nodes, enabling horizontal scaling for databases that outgrow a single server. It maintains PostgreSQL compatibility while adding sharding, columnar storage, and a distributed query engine.

Source: GitHub — github.com/citusdata/citus
12.6k
GitHub stars
780
Forks
C
Primary language
AGPL-3.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorycitusdata/citus
Ownercitusdata
Primary languageC
LicenseAGPL-3.0 — OSI-approved
Stars12.6k
Forks780
Open issues1.1k
Latest releasev14.1.0 (2026-07-01)
Last updated2026-07-08
Sourcehttps://github.com/citusdata/citus

What citus is

Citus extends PostgreSQL with distributed table sharding, reference table replication, a distributed query router, columnar compression, and multi-node coordination. Written in C, it runs as a loadable extension and preserves PostgreSQL semantics for transactions, joins, and constraints across the cluster.

Quickstart

Get the citus source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/citusdata/citus.gitcd citus# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Multi-tenant SaaS applications

Scale customer data horizontally by sharding on tenant ID, isolating workloads and avoiding noisy neighbor problems while maintaining full SQL semantics.

Time-series and IoT data ingestion

Handle millions of events per second from devices by distributing writes across nodes and using columnar storage for efficient compressed analytics.

Real-time analytics at scale

Run complex aggregations, joins, and window functions in parallel across large datasets stored on a cluster, with query routing from any node.

Implementation considerations

  • Identify sharding key early: choice of distribution column is critical to avoid hotspots and cross-shard joins; schema refactoring post-deployment is expensive.
  • Network latency and bandwidth: inter-node communication overhead increases with cluster size and cross-shard query complexity; monitor and test with production-like data.
  • Backup and disaster recovery: multi-node clusters require distributed backup strategy; plan for coordinator and worker node failures.
  • Connection pooling: each worker node consumes connections; configure pooling to avoid connection saturation on large clusters.
  • Data rebalancing: moving shards across nodes during scaling requires careful planning to minimize downtime; test in staging first.

When to avoid it — and what to weigh

  • AGPL licensing constraints — If your deployment or product requires avoiding copyleft obligations, Citus's AGPL-3.0 license requires careful review; commercial licensing via Citus Data may be required for proprietary use.
  • Simple single-server workloads — Adding cluster complexity is unnecessary if your data fits on one PostgreSQL node with acceptable performance; evaluate scaling need before adoption.
  • Strict isolation or air-gapped requirements — Citus cluster setup and management require inter-node communication and coordination; highly restricted network environments may face operational friction.
  • Deeply nested or highly normalized schemas — Distributed joins across many tables or frequent cross-shard operations can add latency; star schemas and denormalization are better suited to Citus.

License & commercial use

Citus is licensed under AGPL-3.0 (GNU Affero General Public License v3.0), a copyleft license requiring source disclosure and license propagation for derivative works and network services.

Commercial use of Citus requires careful license analysis. AGPL-3.0 is a copyleft license; using Citus in a proprietary application or offering it as a service likely triggers disclosure obligations. Citus Data (the commercial entity behind the project) offers commercial licenses separate from the open-source version. Organizations must evaluate their deployment model—embedded use, managed service, or network-exposed—and obtain appropriate licensing or legal counsel. No assumption of commercial freedom should be made without explicit review.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityNeeds review
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Standard PostgreSQL security applies (authentication, SSL, role-based access). Distributed query execution introduces data flow across network; node-to-node communication should be encrypted and restricted to private networks in production. No public security audit data provided. Cluster coordinator is a single point of control; compromise exposes all nodes. Regular patching for both PostgreSQL and Citus extension required. Organizations should review deployment architecture, network isolation, and backup/recovery procedures for data protection.

Alternatives to consider

Cockroach DB

Distributed SQL with ACID transactions and automatic sharding; proprietary licensing but no copyleft; more operational overhead for hybrid deployments.

Vitess (MySQL sharding middleware)

Open-source sharding proxy for MySQL; avoids tight schema coupling but requires explicit shard-aware queries and lacks Citus's integrated columnar storage.

Amazon Aurora (PostgreSQL compatible)

Managed PostgreSQL with read replicas and auto-scaling; simpler operations but limited horizontal write scaling; single-region latency constraints.

Software development agency

Build on citus with DEV.co software developers

Evaluate Citus for your distributed database needs. Test single-node deployment with Docker, review AGPL licensing requirements for your use case, and consult our team on cluster architecture and shard strategy.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

citus FAQ

Can I use Citus in a commercial product without releasing my code?
Not without additional licensing. AGPL-3.0 requires source disclosure for network services and derivative works. Contact Citus Data for commercial licensing options.
Do I need to rewrite my application to use Citus?
Not necessarily. Citus is a PostgreSQL extension, so existing SQL and most ORMs work. However, you should design sharding strategy upfront and use distribution UDFs (create_distributed_table) to enable scaling.
What happens if a worker node goes down?
Open-source Citus does not include automatic failover. Data on that node becomes unavailable; recovery requires manual intervention or external HA tooling (e.g., Patroni). Azure Cosmos DB for PostgreSQL provides automatic failover.
How do I handle uneven shard distribution?
Use the rebalance_table_shards() UDF to redistribute shards across worker nodes. This is an online operation but can impact performance; plan and test in staging.

Software development & web development with DEV.co

DEV.co helps companies turn open-source tools like citus into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source databases stack.

Ready to scale PostgreSQL horizontally?

Evaluate Citus for your distributed database needs. Test single-node deployment with Docker, review AGPL licensing requirements for your use case, and consult our team on cluster architecture and shard strategy.