The architecture of Neki
Blog post from PlanetScale
Neki is a Kubernetes-first sharding and scaling system that uses unmodified PostgreSQL instances while presenting applications with a single PostgreSQL-compatible connection endpoint. Its architecture combines PostgresManager for instance lifecycle and replication setup, Sidecars for connection pooling, health reporting, and backend-session management, and shards consisting of a primary plus replicas for availability and read capacity. An authoritative shard maintains consistent custom type OIDs and schema information across independently managed shards, while Admin monitors health, replication lag, durability policies, and failovers or planned switchovers. The Kubernetes Operator deploys and replaces cluster components, and the Router authenticates clients, parses and plans SQL using the authoritative catalog, routes queries to appropriate shards, coordinates distributed joins and aggregates when necessary, and buffers retry-safe queries during transitions. An etcd-backed Data Topology provides a shared, dynamically updated map of shard groups, routing keys, and sharded tables. The Replicator supports online data movement for imports, table relocation, resharding, and schema changes through logical replication and controlled cutovers, enabling horizontal Postgres scaling with minimal disruption.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Kubernetes | 1 | 4,363 | 405 | 103 | +24% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.