SYSTEM Cited by 10 sources
VTTablet¶
What it is¶
VTTablet is the per-MySQL-instance middleware process in a Vitess cluster. It sits between VTGate and MySQL and owns two responsibilities:
- Connection pooling to its local MySQL instance.
- Health checking of that MySQL instance + publishing the health and role state to the topo-server.
From PlanetScale's own description:
"VTTablet behaves as a middleware between VTGate and MySQL. … The VTTablet will manage connection pooling and perform health checks for MySQL instances, updating its status in a topo-server." (Source: sources/2026-04-21-planetscale-planetscale-vs-amazon-rds)
One VTTablet runs alongside each MySQL instance (primary or replica). In PlanetScale's default topology, a production branch has 1 primary + 2 replicas = 3 MySQL instances, so 3 VTTablets.
Role in the Vitess data path¶
VTTablet sits at hop 4 of the 5-hop PlanetScale MySQL data path:
VTGate picks a tablet (by role and health, as published in the topo-server), sends the query to the corresponding VTTablet. VTTablet then:
- Multiplexes inbound VTGate queries onto a fixed-size back-end MySQL connection pool (see patterns/two-tier-connection-pooling).
- Queues excess requests when the pool is saturated — "PlanetScale offers connection pooling, which scales with your cluster and enables connection requests to queue" (sources/2026-04-21-planetscale-planetscale-vs-amazon-rds).
- Enforces per-query policies configured in VSchema / tablet config (transaction throttler, row-limit protection, etc. — see systems/vitess-transaction-throttler).
- Publishes health + role state (primary / replica / spare, serving / not-serving) to the topo-server so VTGate can route accordingly.
Why the split with VTGate¶
The architectural division of labor (see patterns/query-routing-proxy-with-health-aware-pool):
| Responsibility | VTGate | VTTablet |
|---|---|---|
| Routing decision | ✅ | |
| Query planning / cross-shard | ✅ | |
| Back-end MySQL connection pool | ✅ | |
| MySQL health checks | ✅ | |
| Topo-server writes (health) | ✅ | |
| Topo-server reads (routing) | ✅ | |
| Statelessness | ✅ (effectively) | ❌ (owns pool + local MySQL) |
VTTablet being co-located with MySQL is what makes cheap fast health checks possible — a VTTablet runs health probes against 127.0.0.1:3306 on the same host, no network round-trip. That same co-location is what makes the connection pool a local resource that doesn't compete with other tablets' pools.
Connection pooling specifics¶
VTTablet's connection pool is the back-end half of Vitess's two-tier connection pool:
- Front-end pool: VTGate ↔ VTTablet connections (gRPC, not MySQL protocol).
- Back-end pool: VTTablet ↔ MySQL connections (MySQL protocol, local).
The back-end pool is bounded; when it's full, incoming requests queue. This is the mechanism that lets a PlanetScale MySQL database claim "technically unlimited" client connections at VTGate — the client-facing ceiling is much higher than the real back-end MySQL max_connections ceiling because requests multiplex and queue at the VTTablet layer. Benchmarked at 1M client connections in sources/2026-04-21-planetscale-one-million-connections.
See sources/2026-04-21-planetscale-connection-pooling-in-vitess for the set-var / reserved-connection / tainted-connection mechanics that dictate when a pooled connection can be returned to the pool vs held open for the session.
Role transitions and failover¶
VTTablet roles are managed by the Vitess control plane (VTOrc / Orchestrator — see systems/vtorc, systems/orchestrator). When a VTTablet transitions role (e.g., replica → primary during a reparenting event), it:
- Updates its role state in the topo-server.
- VTGate, reading topo-server, re-routes writes to the new primary VTTablet.
This is how VTGate + VTTablet + topo-server collectively implement automatic failover without the client needing to reconnect or re-resolve — VTGate simply re-reads the topo-server and starts sending writes to the new primary tablet.
Seen in¶
- sources/2026-04-21-planetscale-what-makes-up-a-planetscale-vitess-database — Brian Morrison II (2023-08-23) pedagogy-101 restatement verbatim: "Each MySQL instance in a Vitess cluster is called a Tablet, which is a
mysqldinstance with a sidecar process calledvttablet. Each cluster has at least one and it's where your data lives." Names VTTablet as one of three Vitess primitives alongside VTGate and the newly-namedvtctld. - sources/2026-04-21-planetscale-planetscale-vs-amazon-rds — canonical architectural description (pool + health + topo-server publisher); co-canonical with Aurora post.
- sources/2026-04-21-planetscale-planetscale-vs-amazon-aurora — identical VTTablet architecture paragraph.
- sources/2026-04-21-planetscale-comparing-awss-rds-and-planetscale — earlier 2021 positioning post; named but not architecturally specified.
- sources/2026-04-21-planetscale-connection-pooling-in-vitess — VTTablet connection pool internals (set-var hints, reserved connections, tainted connections).
- sources/2026-04-21-planetscale-one-million-connections — empirical anchor for the scale claim VTTablet pooling enables.
- sources/2026-04-21-planetscale-anatomy-of-a-throttler-part-2 — VTTablet as the site of tablet-throttler hibernation / metric scope.
- sources/2026-04-21-planetscale-consensus-algorithms-at-scale-part-4-establishment-and-revocation — VTTablet's role in the establishment-revocation protocol during reparenting.
- sources/2026-04-21-planetscale-what-is-vitess-resiliency-scalability-and-performance — Brian Morrison II's 2022-10-21 pedagogy-101 disclosure: "each instance of MySQL has an associated process called the VTTablet, to which VTGate sends the query" canonicalises the 1:1 VTTablet-to-MySQL co-location at pedagogy altitude. The two-tier pool framing ("Vitess takes the lightweight connections established by each client to VTGate and maps them to a smaller pool of MySQL connections managed by VTTablet. This process in turn helps to avoid overloading the individual MySQL processes, resulting in lower resource utilization since only VTTablet needs to connect to the underlying MySQL process") is the first-principles statement that the connection-pooling-in-vitess + sources/2026-04-21-planetscale-one-million-connections|1M-connections posts quantify. Canonical beginner on-ramp.
Related¶
- systems/vtgate — the stateless router in front of VTTablet.
- systems/vitess — parent system.
- concepts/vitess-topo-server — where VTTablet publishes its health and role.
- patterns/query-routing-proxy-with-health-aware-pool — the architectural shape VTTablet embodies (pool + health owner).
- patterns/two-tier-connection-pooling — VTTablet is the back-end tier.
- systems/vitess-throttler — runs inside VTTablet; uses VTTablet's co-location with MySQL.