Reshard Under Load
Easy · system design problem
A write-heavy spike needs three times the primaries. Vitess can split shards online — and vtgate’s pool becomes the next bottleneck.
The orders keyspace runs on two MySQL shards behind Vitess (vtgate). Writes dominate and cost three times a read; each shard primary allows 151 connections; vtgate keeps a pool of 60 connections per replica, and queries take ~10 ms. At T+20s a flash sale multiplies orders by 2.5 for the rest of the day. With Vitess, resharding is an online operation: vtgate keeps routing while the new shards fill.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.