118M Queries per Second on Neki

Hacker News Top News

Summary

PlanetScale achieved 118 million queries per second on their Neki platform with linear scalability across 512 shards, demonstrating exceptional performance and throughput in database operations.

No content available
Original Article
View Cached Full Text

Cached at: 09/11/26, 05:25 PM

# 118 million queries per second on Neki — PlanetScale Source: [https://planetscale.com/blog/118-million-queries-per-second-on-neki](https://planetscale.com/blog/118-million-queries-per-second-on-neki) We released[Neki](https://planetscale.com/blog/introducing-neki)in platform preview yesterday\. To celebrate the release, we wanted to test out running 1 million queries per second on Neki\. We hit this goal pretty quickly on 5 shards and decided to see how much further we could push it\. This next run ended with 512 shards running 118 million queries per second with 1\.22 PiB of data\. ## [Linear scalability](https://planetscale.com/blog/118-million-queries-per-second-on-neki#linear-scalability) The benchmark was very simple\. A single\-shard point select, one row fetched per\-query by primary key\.No writes, joins, or cross\-shard queries\.The workload that each shard receives is isolated, in that there are no single queries that span multiple shards\. Our target was to sustain 200k QPS on each shard, and then grow the cluster to increase throughput\.Five shards, then fifty, then 512\. ShardsRoutersDelivered QPSQPS per shard512999,624199,92550489,923,900198,478512480118,538,803231,521 Ten times the shards, ten times the throughput\.Then ten times again\.From 5 shards to 50 the per\-shard rate held within 0\.8%\.At 512 the shards still had headroom, so we let the load generator use it and each shard settled at 231k QPS instead of 200k\. ## [118\.5 million QPS](https://planetscale.com/blog/118-million-queries-per-second-on-neki#1185-million-qps) We sustained`118,538,803`QPS for 16 minutes across 512 shards and 1\.22 PiB of data\.Our largest recording was`118,747,267`\. - 512 shards, each with one Postgres primary each on an`r8g\.16xlarge` - 480 Neki routers, each on its own`8xlarge`instance - p99 latency of 6\.06ms at the router and 13\.95ms at the client - 67 errors per second, about one query in 1\.8 million - 15\.8M read IOPS across the fleet - over 2 Tb per second on the network Worth being clear about this run: the shards were primary\-only with no replicas, the workload is read\-only across queries ranging in complexity, and we did not fail over during the measured window\. We will go into details on the engineering effort and interesting challenges we faced along the way to reaching 100 million QPS in a future article\.

Similar Articles

Neki by PlanetScale

Hacker News Top

Neki is a sharded Postgres solution by PlanetScale that enables horizontal scaling to hundreds of millions of QPS and petabytes of data with zero-downtime operations.

Neki

Hacker News Top

Neki is sharded Postgres from PlanetScale, designed to scale Postgres databases across multiple machines while maintaining standard Postgres compatibility and built-in online workflows.

Making 768 servers look like 1

Hacker News Top

PlanetScale explains how to scale a relational database from a single server to 768 servers using database sharding, addressing bottlenecks like write limits and resource contention.