Vitess

active

by Vitess Authors (CNCF; maintained largely by PlanetScale) · since 2012 · also known as vitess.io

CNCF-graduated sharding and clustering layer that makes a fleet of MySQL servers look like one database.

relationaldocumentdatabase engineopen source (permissive)mature

Overview

Vitess is the sharding system YouTube built to scale MySQL, later open-sourced and graduated from the CNCF. A stateless proxy tier (VTGate) parses MySQL-protocol queries and routes them to shards, each a normal MySQL primary with replicas managed by VTTablet, while VSchema describes how tables are split and resharding happens online. It also brings connection pooling, query rewriting and safety limits, online DDL, and VStream change feeds. Vitess is the right tool when a single MySQL primary is no longer enough and you want to keep MySQL's storage engine and tooling. The cost is real operational complexity and some SQL limits on cross-shard queries; PlanetScale offers it as a managed service.

Strengths & trade-offs

Strengths

  • +Proven at the largest MySQL deployments (YouTube, Slack, GitHub, HubSpot)
  • +Online resharding and table moves without application downtime
  • +Connection pooling and query safety limits protect MySQL from overload
  • +Built-in online DDL with revertible migrations
  • +VStream provides a unified change stream across all shards

Trade-offs

  • −Cross-shard transactions are not fully ACID (two-phase commit is optional and limited)
  • −Some SQL constructs are unsupported or slow when queries span shards
  • −Many components (VTGate, VTTablet, VTOrc, topology server) to operate
  • −Requires careful choice of sharding keys via VSchema

Great for

  • +Scaling a large MySQL application beyond one primary
  • +Multi-tenant SaaS sharded by customer
  • +Consolidating many MySQL databases under one routing layer
  • +Zero-downtime schema migrations on huge tables

Think twice for

  • −Small apps that fit on a single MySQL server
  • −Workloads requiring strict cross-shard ACID
  • −PostgreSQL-based stacks (see Multigres)

Capabilities

Native or official first-party support · 11 of 25 tracked

✓Transactions
✓Joins
✓Secondary indexes
✓Full-text search
✓JSON
✓Change data capture
✓Materialized views
✓Durable persistence
✓Compression
✓Role-based access
✓Online schema changes
–Vector search
–Geospatial
–Triggers
–Stored procedures
–TTL / expiry
–Pub/Sub
–Columnar storage
–In-memory
–Encryption at rest
–Time travel
–Branching
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Massive · Multi-PB
Horizontal scaling
Native
Multi-region
Read replicas
Transactions
Limited ACID
Consistency
Strong, Eventual
Schema
Strict
Architecture
Distributed, Primary replica, Client server
Query languages
SQL

Horizontal sharding with online resharding and MoveTables; runs multi-PB MySQL fleets at Slack, GitHub and YouTube; one primary per shard.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

compatible withMySQL
apis & protocolsMySQL wire protocol, gRPC, VStream
client languagesJava, Go, Python, JavaScript, PHP, Ruby, C#
used byYouTube, Slack, GitHub, HubSpot

Alternatives to Vitess

Compare all→
PlanetScaleRelational25.7

Performance-focused managed MySQL (Vitess) and Postgres, with NVMe-backed Metal clusters and branching.

vitess vs planetscale →
TiDBRelational35.9

MySQL-compatible distributed SQL with a row store for OLTP and a columnar replica for real-time analytics.

vitess vs tidb →
Apache ShardingSphereRelational9.5

Apache sharding middleware that adds sharding, read/write splitting and encryption over MySQL or Postgres.

vitess vs apache-shardingsphere →
MySQLRelational82.3

The web's default open-source SQL database, now on calendar versioning with 9.7 as the LTS line.

vitess vs mysql →
MultigresRelational12.4

Alpha-stage, Vitess-inspired sharding, pooling and HA layer for unmodified PostgreSQL, led by Supabase.

vitess vs multigres →
PolarDB-XRelational5.0

Alibaba's open-source, MySQL-compatible shared-nothing distributed SQL with Paxos and columnar indexes.

vitess vs polardb-x →

Vitess FAQ

What is Vitess?

Vitess is a relational database by Vitess Authors (CNCF; maintained largely by PlanetScale), first released in 2012. Vitess is the sharding system YouTube built to scale MySQL, later open-sourced and graduated from the CNCF. A stateless proxy tier (VTGate) parses MySQL-protocol queries and routes them to shards, each a normal MySQL primary with replicas managed by VTTablet, while VSchema describes how tables are split and resharding happens online. It also brings connection pooling, query rewriting and safety limits, online DDL, and VStream change feeds. Vitess is the right tool when a single MySQL primary is no longer enough and you want to keep MySQL's storage engine and tooling. The cost is real operational complexity and some SQL limits on cross-shard queries; PlanetScale offers it as a managed service.

Is Vitess open source?

Yes. Vitess is open source. License: Apache License 2.0.

Does Vitess support ACID transactions?

Partly. Vitess offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong, eventual consistency.

Does Vitess scale horizontally?

Vitess scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at massive scale (Multi-PB). It supports cross-region read replicas.

How can I run Vitess?

You can self-host it. Managed offerings include PlanetScale (Vitess).

What is Vitess best for?

Vitess is a strong fit for scaling a large MySQL application beyond one primary, multi-tenant SaaS sharded by customer and consolidating many MySQL databases under one routing layer. Think twice for small apps that fit on a single MySQL server.

What are the best alternatives to Vitess?

Common alternatives to Vitess include PlanetScale, TiDB, Apache ShardingSphere, MySQL and Multigres. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Vitess?

Vitess ranks #142 of 844 databases on the WhichDB Score (21.2/100), and #45 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.