Skip to content

SYSTEM Cited by 1 source

Citus

Citus is an open-source horizontal-sharding extension for PostgreSQL, designed to add sharding and distributed-query capabilities without forking the database engine. Citus is to Postgres what Vitess is to MySQL: a substrate-layer sharding solution that lets the application see what looks like a single Postgres database while row-level storage is distributed across worker nodes behind a coordinator.

Citus was originally a company (Citus Data) acquired by Microsoft in 2019; the extension is now maintained as part of Microsoft's Azure Cosmos DB for PostgreSQL product, with the core extension remaining open source.

Position in the sharding landscape

Justin Gage's 2023 framing (Source: sources/2026-04-21-planetscale-what-is-database-sharding-and-how-does-it-work):

"Citus does what Vitess does for MySQL, but for Postgres (minus some more flashy features). It's open source, designed as a Postgres extension, and can be run as a single node or several."

That positions Citus as the Postgres-side reference solution for teams who want to keep their Postgres ecosystem (tooling, extensions, operational expertise) but need horizontal sharding for scale. The "minus some more flashy features" parenthesis was Gage's 2023-era read — Vitess has deeper tooling around online resharding, VReplication, and MoveTables; Citus's design is more Postgres-native.

Architecture

Citus works on a coordinator-worker topology:

  • Coordinator node — receives queries from the application (looks like a normal Postgres instance), holds distributed-table metadata, plans distributed queries, and routes sub-queries to worker nodes.
  • Worker nodes — each holds a set of shards (logical partitions of distributed tables). Shards are regular Postgres tables; Citus assigns them to workers via a metadata catalog.
  • Distributed tables — user-declared via SELECT create_distributed_table('orders', 'order_id') — the extension creates the required shard tables on workers and manages their routing.

Joins that are co-partitioned on the distribution column execute entirely on workers; cross-partition joins become coordinator-fronted fan-outs.

Production users (Gage's named list)

  • Algolia — search infrastructure.
  • Heap — product analytics.
  • Cisco — network telemetry.

These are the three named by Gage (2023-04-06); the adoption surface has grown since then under the Azure Cosmos DB umbrella.

Docs as general sharding guidance

Gage's aside on Citus's documentation:

"Their docs have good general advice for picking your sharding scheme, Citus or otherwise."

The Citus sharding-strategy docs are often cited as substrate-agnostic guidance on shard-key choice + distribution-column selection + reference-vs-distributed-table design, independent of whether the reader ends up deploying Citus.

Relationship to PlanetScale

PlanetScale offers PlanetScale for Postgres as their Postgres product (launched 2025), which is not based on Citus — it's PlanetScale's own architecture on top of unforked Postgres. Gage frames Citus as the canonical Postgres-sharding alternative for readers not using PlanetScale: "If you don't need sharding, but are interested in ultra fast NVMe-backed instances, check out PlanetScale for Postgres."

Relationship to Vitess

  • Same goal: transparent horizontal sharding without changing the underlying database engine.
  • Different implementation layer: Citus is a Postgres extension (installed into the database server); Vitess is a proxy tier (separate process between application and MySQL).
  • Different sharding substrate: Citus leverages Postgres foreign data wrappers + custom planner hooks; Vitess ships its own proxy binary (vtgate) and storage-node supervisor (vttablet).

Wiki scope

This is a stub. Citus-specific material should cite Citus Data / Microsoft's docs or Citus conference talks directly.

Seen in

  • sources/2026-04-21-planetscale-what-is-database-sharding-and-how-does-it-work — Justin Gage (guest post for PlanetScale, 2023-04-06) names Citus as the canonical Postgres-sharding alternative to Vitess with three production adopters (Algolia, Heap, Cisco) and flags the Citus docs as general-purpose sharding-strategy guidance. First wiki disclosure of Citus as a named Postgres sharding substrate.
Last updated · 550 distilled / 1,221 read