Vitess
A clustering system that shards MySQL horizontally and hides the sharding behind a single MySQL-compatible endpoint.
- Category: Storage & Database
- CNCF maturity: Graduated
- Language: Go
- License: Apache-2.0
- Repository: vitessio/vitess
- Documented at commit:
7924743(2026-06-22,main)
What it is
Vitess sits between an application and a fleet of MySQL servers. The application connects to a stateless proxy called VTGate as if it were a single MySQL server. VTGate parses each query, plans how to run it, and routes it to the right shards. The sharding logic lives in Vitess instead of in the application.
A Vitess deployment splits a logical database (a keyspace) into shards, each backed by a primary and replica MySQL group. A sidecar called VTTablet runs next to every MySQL instance and handles query execution, connection pooling, health checks, and backups. A control plane (vtctld, VTOrc, VTAdmin) handles schema changes, resharding, and failover. Topology metadata lives in etcd, ZooKeeper, or Consul.
Vitess began at YouTube in 2010 to scale MySQL past the limits a single server hits. It is for teams that already run MySQL, have outgrown one machine, and want to scale out without rewriting their application or giving up the MySQL wire protocol.
When to use it
- You run MySQL at a scale where one primary cannot hold the data or the write load.
- You want to shard without embedding shard-selection logic in application code.
- You need online resharding, non-blocking schema changes, or managed failover across many MySQL instances.
- You are on Kubernetes and want a proxy layer that presents one MySQL endpoint over many backends.
It is a poor fit when a single MySQL server still handles your load, since Vitess adds an operational layer (topology service, proxies, sidecars) that only pays off at scale. It is also not a drop-in for full cross-shard ACID isolation; cross-shard transactions carry constraints the application must understand.
In this deep-dive
- History: origin at YouTube, CNCF graduation, and how it evolved.
- Architecture: components and how a query flows.
- Adoption & Ecosystem: who runs it and what surrounds it.
- Internals: the VTGate query path, read from source.
- Getting Started: a local cluster from the examples.