{
  "id": 6787343,
  "title": "Neki – Sharded Postgres",
  "url": "https://urgent.news/2026/09/10/neki-sharded-postgres",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-10T15:43:49.000Z",
  "source": {
    "name": "Hacker News Best",
    "slug": "hacker-news-best",
    "url": "https://planetscale.com/blog/introducing-neki"
  },
  "original_language": "en",
  "account": "Neki is a sharded version of Postgres developed by PlanetScale, designed to help companies scale their databases as they grow. It allows users to keep real Postgres on every shard, enabling seamless connections to a Neki router over the standard Postgres wire protocol. This means that existing drivers, ORMs, and connection strings continue to function without modification. Each shard is a complete Postgres cluster, consisting of one primary and at least two replicas, distributed across three availability zones. Users can choose their own shard key and control how tables are grouped and distributed through a JSON data topology. Neki offers several advantages over other sharding solutions. First, it operates as a fully online workflow, meaning that schema changes, version upgrades, failovers, imports, and resharding can all be performed without requiring downtime. Additionally, it includes all of the features users rely on from PlanetScale, such as Insights, schema recommendations, branching, and MCP. Neki introduces a few key principles: it adheres to the Postgres standard, does not require changes to the code, and maintains compatibility with Postgres extensions and performance. The architecture of Neki consists of four main components: the Neki router, which connects the application to the database; individual shards, each a full Postgres cluster with at least two replicas; shard groups, which allow for organizing tables or workloads on different sets of shards; and sidecars that improve connection handling. When a user connects to a Neki router, the router parses the query, builds a distributed query plan, and sends the workload to the appropriate shards for processing. The results are then combined into a single stream. Each shard functions as a regular Postgres instance, allowing for extensions, SQL support, and performance behavior. Sidecars optimize connection handling by sizing pools based on the instance's capabilities. The control plane manages the health of every node, handles planned and unplanned failovers, and coordinates workflows for resharding, schema changes, and version upgrades. The data topology, defined through a JSON configuration, maps logical tables to physical shards. Users can define shard indexes and shard groups to determine how tables are distributed across shards. Neki also offers an online operations model, allowing users to perform maintenance tasks like schema changes, version upgrades, and failovers without disrupting the application. This includes provisioning new target nodes, catching them up with replication, switching traffic, and retiring old nodes, all within the same psql connection. While Neki provides significant benefits for scaling Postgres databases, it is currently in a platform preview, and production workloads should not be run on it at this stage.",
  "summary": "Article URL: https://planetscale.com/blog/introducing-neki Comments URL: https://news.ycombinator.com/item?id=49645686 Points: 269 # Comments: 149",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}