Vitess VTGate: How Queries Find a Shard Without the App Becoming a Router
VTGate, VSchema, and scatter vs targeted queries: the routing layer that made YouTube's MySQL split look like one database.
Tag
8 articles · 28 min of reading
VTGate, VSchema, and scatter vs targeted queries: the routing layer that made YouTube's MySQL split look like one database.
How InnoDB stores rows in primary-key order, what secondary indexes actually contain, and how a UUID PK becomes a random I/O tax.
Pinterest hit early scaling walls, tried NoSQL alternatives, then built ID-encoded sharded MySQL instead — and it outlasted the exotic options.
Behind Pinterest's sharded MySQL fleet sits a heavy memcache layer, and the real engineering challenge was never caching reads — it was invalidating them correctly.
Why Uber built Schemaless, an append-only document layer on top of sharded MySQL, instead of migrating wholesale to a NoSQL database.
Why GitHub adopted Vitess to shard MySQL horizontally instead of continuing to scale a single primary vertically.
Why Slack adopted Vitess to shard MySQL horizontally at the connection-pooling and proxy layer instead of migrating off relational storage entirely.
The write amplification, replication, and connection-handling problems that pushed Uber off Postgres and onto a MySQL-based storage stack.