Citus is an extension to Postgres that intelligently distributes your database & your queries across multiple nodes. However you query and however your data is organized, Citus scales your per-query performance, not just the number of queries you can run. Available as open source, as enterprise software you can run anywhere, and as a fully-managed database as a service.
We get that you trust Postgres. So we built Citus as a Postgres extension to stay current with the latest releases. And we built Citus for horizontal scale. With Citus, you get to leverage all your Postgres expertise, use your familiar SQL toolset, and scale out your database.
You should not have to re-architect your app when you hit the ceiling on single-node Postgres. Sharding your app and switching to NoSQL both steal time & resources from your core business. Not to mention having to give up SQL. At Citus, we make sharding simple.
By parallelizing SQL queries across multiple nodes, Citus delivers unparalleled performance. Even with real-time data ingest and sub-second queries across billions of rows of data, with high concurrency. And adding nodes to increase parallelism is as easy as dragging a slider.
We have decades of collective experience managing millions of Postgres databases in the cloud. With our fully-managed database as a service, we carry the pager so you don’t have to. So you can focus on your app and forget about your database.
All queries to a Citus database cluster are managed by the Citus coordinator node, which looks just like single-node Postgres to the application—modulo the performance benefits from scaling out. The Citus coordinator is equipped with a distributed SQL engine that transforms SQL queries & routes the transformed queries to the correct shards on the correct worker nodes. In this animation, the co-located join and update scenarios are examples of single-tenant SQL queries, hence they only need to query a subset of shards on a subset of the worker nodes. Whereas the distributed aggregate and distributed transaction scenarios need to access shards across multiple nodes.
No longer do you have to give up the relational benefits of SQL in order to get the performance of a scale-out database. And no longer do you have to redesign your data model and re-architect your SaaS application in order to scale out. Because Citus is an extension to Postgres, Citus works just like Postgres, with support for complex transactions, foreign keys, relationships between models, and joins.
Citus works well with most of the popular programming languages, whether Ruby, Python, Java, Node.js, Javascript, Go, C++. And to make it easy for you to migrate your multi-tenant Rails and Django applications to Citus, we’ve created PostgreSQL libraries so your SaaS app should work mostly as-is: an activerecord-multi-tenant gem for Ruby on Rails, and a Python django-multitenant library for Django.
As for migrating your data from single-node Postgres to Citus, the tools you need depend on the size of your database. For some, pg_dump and pg_restore are sufficient. For others migrating from single-node RDS Postgres to Citus, we’ve created a citus_warp utility that replicates your current database into Citus and keeps the two in sync while you’re getting ready to deploy to production. If you need help figuring out if Citus is right for you and how best to migrate, just contact us and we’ll help figure it out.
Citus scales out Postgres horizontally—transforming your favorite relational & open source database into a distributed database. If you’re running into the limits of single-node Postgres, Citus might be right for you. Some common workloads that work well on Citus are:
What happens when your SaaS business becomes an overnight success? The good news is you no longer have to re-architect your app to migrate to NoSQL or to shard your application. Because most SaaS applications already have the notion of a tenant or customer built into their data model, SaaS apps are a good fit for a distributed database like Citus. Citus gives you relational semantics—including ACID transactions and full SQL coverage—and allows you to transparently scale to hundreds of machines.
Customer-facing analytics dashboards often require sub-second response times. And since so many users query their dashboards at the same time, the ability to support high numbers of concurrent users is important as well. By sharding and parallelizing your SQL queries across multiple nodes, Citus gives you real-time analytics and transactions. So you can perform sub-second scans and aggregations across billions of events, while still providing millisecond latency on inserts, upserts, and small look ups.
Citus vs. Single-Node Postgres
A side-by-side comparison of Citus vs. single-node Postgres, comparing the performance of CREATE INDEX, data loading, analytical queries, and lookup queries.
Citus Cloud is our fully-managed database as a service, backed with our expertise monitoring and managing millions of Postgres databases. We carry the pager, so you don’t have to.
Citus Community is our open source edition. If you need
Citus Enterprise gives you the same awesome scale-out features as our open source edition, plus advanced features like shard rebalancing & tenant isolation.
| Citus Distributed Database Features: | Citus Community | Citus Cloud | Citus Enterprise |
|---|---|---|---|
|
Relational database semantics Citus is Postgres, which means we offer relational database features like ACID transactions, joins, foreign key constraints, and SQL coverage. |
|||
|
Horizontal scalability & sharding Citus is an extension to Postgres that enables you to scale out Postgres across multiple nodes, giving your Postgres database a much larger memory, compute, and disk footprint than on a single-node. And increasing performance in a big way. At Citus, we like to say that we make sharding simple. |
|||
|
Distributed SQL engine Distributed query planner and executor that parallelizes queries across shards, enabling massive parallelism and efficient resource utilization. |
|||
|
Extension to Postgres Citus is not a fork, rather we use PostgreSQL’s extension APIs to scale out. We give you trusted, familiar Postgres. |
|||
|
Rich data types & Postgres extensions PostgreSQL and Citus support 40+ data types, including semi-structured data types and JSONB. Popular Postgres extensions frequently used with Citus include HyperLogLog (HLL), PostGIS, hstore, pg stat statements, dblink, plpgsql, uuid ossp, ltree, & more. |
|||
|
Flexible deployment options Citus is available as open source, on-prem enterprise software, and as a fully-managed database as a service. |
|||
|
Compatible with popular programming languages, includes Rails & Django support Works with Ruby, Python, Java, Node.js, Javascript, Go, C++. And to make it easy to migrate your multi-tenant Rails and Django apps to Citus, we’ve created PostgreSQL libraries: activerecord-multi-tenant gem on Rails, and django-multitenant library for Django. |
|||
|
Distributed transactions |
|||
|
Probabilistic distincts (sketch algorithms) |
|||
|
Fine-grained access controls |
|||
|
High Availability & Streaming Replication Citus Cloud includes fully automated HA that is managed by the team at Citus; Citus Enterprise includes software features & instructions to implement HA on-prem. |
|||
|
Tenant isolation Multi-tenant SaaS applications sometimes need to isolate the shards for a large customer to ensure that the large customer gets the resources they need and doesn’t negatively impact performance for everyone else. Hence: tenant isolation. |
|||
|
Citus Support & SLA |
|||
|
Zero-downtime shard rebalancer When adding nodes to a Citus cluster, the zero-downtime shard rebalancer enables you to redistribute shards across old and new nodes to better balance the data distribution and the performance of your Citus database. |
|||
|
Simple provisioning & easy to scale out In Citus Cloud, you can setup a cluster in just a few clicks; adding more nodes & increasing memory, compute, and disk is as simple as dragging a slider |
|||
|
Fully-managed database as a service Citus Cloud is run by a team with decades of collective experience managing millions of Postgres databases in the cloud. Hosted on AWS and available in most AWS regions, Citus Cloud includes automated backups, high availability, point in time recovery, automated health checks, automated monitoring, forks, & followers. |
|||
|
Citus Cloud security suite Includes HIPAA, 2FA, encryption at rest and in flight, role-based, fine-grained access controls, VPC peering, IP whitelisting, and of course continual review of security vulnerabilities. |