Citus is a PostgreSQL extension that transforms Postgres into a distributed database capable of scaling across a cluster of nodes.
Citus solves the scalability limits of single-node PostgreSQL by distributing data and queries across multiple nodes. It works by sharding distributed tables across a cluster to combine CPU, memory, storage, and I/O capacity, while maintaining reference tables replicated to all nodes for efficient joins and foreign keys. A distributed query engine routes and parallelizes operations across the cluster, and columnar storage provides compression and fast scans. The tool allows queries to be issued from any node in the cluster, enabling full utilization of the cluster's capacity.
Citus suits applications experiencing growth beyond a single PostgreSQL instance, particularly multi-tenant systems, real-time analytics on time series or IoT data, and workloads requiring high transaction throughput. It is especially valuable when data size and volume increase over time, causing problems like high CPU utilization, I/O wait times, out-of-memory errors, or autovacuum bloat on a single node. Because Citus is a PostgreSQL extension rather than a separate database system, it works with existing PostgreSQL tools and versions, allowing incremental adoption starting from a single node and scaling to larger clusters by adding worker nodes and rebalancing shards.
The project maintains active development with regular updates and new releases. Documentation is comprehensive, including architectural details and a peer-reviewed academic paper describing the system's design and approach. The tool integrates deeply with the PostgreSQL ecosystem, supporting schema-based sharding and high availability configurations alongside standard PostgreSQL features and extensions.