Neki 每秒处理 1.18 亿次查询
118M Queries per Second on Neki

原始链接: https://planetscale.com/blog/118-million-queries-per-second-on-neki

为庆祝 Neki 平台预览版的发布,团队通过实现每秒超过 1.18 亿次查询(QPS)的稳定性能,成功验证了其强大的可扩展性。 测试从 5 个分片、100 万 QPS 的基准开始,最终扩展至 512 个分片,并保持了每个分片约 23.1 万 QPS 的稳定表现。此次破纪录的运行持续了 16 分钟,共处理了 1.22 PiB 数据,网络吞吐量超过每秒 2 Tb,客户端 p99 延迟为 13.95 毫秒。 该基准测试基于主架构,在 512 个 r8g.16xlarge 实例的 PostgreSQL 分片和 480 个 Neki 路由器上运行了只读点查询工作负载。测试中每秒仅出现 67 次错误,成功率约为 99.9999%,凸显了 Neki 通过增加分片数量实现吞吐量线性扩展的能力。公司计划发布后续文章,详细介绍实现这一超 1 亿 QPS 里程碑所克服的工程挑战。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 在 Neki 上实现每秒 1.18 亿次查询 (planetscale.com) 8 分,由 joshmgross 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 5 条评论 | 帮助 samlambert 11 分钟前 | 上一条 | 下一条 [-] 这次运行花费了 25 万美元,但我觉得很值。 回复 whalesalad 0 分钟前 | 父评论 | 下一条 [-] 我估算了一下,实现这个目标的集群成本大约是每小时 3000 到 4000 美元。我觉得 r8g.16xlarge 那里可能有笔误,实际上应该是 r8gd.16xlarge(注意那个 d),它配备了直接挂载的 NVMe 磁盘。 回复 handfuloflight 8 分钟前 | 父评论 | 上一条 | 下一条 [-] 我不知道人类竟然能造出这样的东西。 回复 znpy 6 分钟前 | 上一条 | 下一条 [-] 如果这是闭源的,那我就毫无兴趣。 回复 jeffbee 20 分钟前 | 上一条 [-] “可以通过付费来横向扩展点查询(point reads)”这一点对任何人来说都不是新闻。 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

We released 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.

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 shard
512999,624199,925
50489,923,900198,478
512480118,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.

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.

联系我们 contact @ memedata.com