PlanetScale has unveiled Neki, a distributed Postgres platform now available in platform preview. Drawing on over eight years of experience managing large sharded MySQL clusters, PlanetScale designed Neki to meet the demands of rapidly growing Postgres workloads that exceed the capacity of single machines.

As Postgres databases scale, they often encounter issues such as lengthy maintenance operations, connection limits, and slow backups. Traditional solutions like application-level sharding or Postgres-compatible distributed databases either increase complexity or reduce native Postgres functionality.

Neki addresses these challenges by maintaining unmodified Postgres instances on each shard, ensuring full compatibility with Postgres extensions and behavior. The architecture includes a Neki router that handles query parsing, distributed planning, and result aggregation while communicating using the Postgres wire protocol. This allows existing applications and ORMs to connect seamlessly with a single connection string.

Each shard consists of a primary Postgres instance with replicas distributed across availability zones. Shards are grouped to allow different tables or workloads to be assigned to specific shard sets, with configurable instance sizes and parameters. Sidecars running alongside each Postgres instance optimize connection pooling beyond traditional tools like PgBouncer.

A centralized control plane manages node health, failovers, schema changes, version upgrades, and resharding workflows. These operations run online through the same connection used by applications, minimizing downtime.

Neki also supports unsharded deployments with enhanced connection pooling and zero-downtime upgrades, enabling users to start simply and scale when needed. Additional features include insights, schema recommendations, and branching, consistent with PlanetScale's existing offerings.

PlanetScale cautions that Neki is still evolving and not yet recommended for production use during the preview phase. Interested users can opt in via the PlanetScale platform and access documentation and support channels. The company also offers private demos and consultations for large Postgres clusters considering Neki.

By providing a scalable, fully Postgres-compatible distributed database solution, Neki aims to help organizations overcome the limitations of single-node Postgres deployments while preserving the familiar developer experience.