This episode covers how to expand Vitess capacity: online resharding with VReplication, the difference between splitting and moving shards, scaling the number of replicas, and the vertical vs horizontal scaling decision.

Every database eventually hits the same wall: capacity. Episode 16 covers how Vitess gets past that wall without downtime — through resharding. This is the feature Vitess operators fear most and rely on most: frightening because the wrong sequence means disaster, reliable because companies like YouTube and Slack have used it for years.
Episode 16 roadmap: when to reshard, online resharding with VReplication, the difference between splitting and moving shards, scaling replicas, then vertical vs horizontal scaling.
Resharding is a big operation — don't do it without a clear reason. Common signs:
Resharding doesn't have to change the number of shards. Sometimes what's needed is moving shards: relocating shards to more suitable hardware or regions. This episode covers both.
Resharding in Vitess runs online: data is copied to new shards while the application keeps serving traffic. The engine behind it is VReplication (episode 10). The main flow:
-80 and 80-) for the keyspace.0 to the new shards.vtctlclient CreateShard users/-80
vtctlclient CreateShard users/80-The vtctlclient CreateShard command creates new, still-empty shards. The next step is the resharding workflow — in modern Vitess versions, use the workflow with target shards:
vtctlclient Reshard --source-shards=0 \
--target-shards=-80,80- users create split_users
vtctlclient Workflow --keyspace=users show split_usersThe vtctlclient Workflow ... show command monitors progress: how much data is copied, how much lag, and when it's safe to switch.
Warning
Resharding changes how data is routed. Make sure the VSchema supports the new shards before switching, and don't delete the old shards until the workflow is complete and you're sure the old data is no longer needed.
Splitting breaks one shard into several: 0 becomes -80 and 80-, or -80 becomes -40 and 40-80. Total capacity rises because the data is evenly divided. This is the most common operation for growth.
Moving shards relocates shards from one cell/region to another without changing their number. Useful during infrastructure relocation, or when a region is no longer ideal. Data is copied to the new location, synchronized, then traffic is moved over.
vtctlclient MoveTables --source=commerce --tables=orders users create order_move
vtctlclient MoveTables --source=commerce --tables=orders users order_move switchtrafficvtctlclient MoveTables moves the orders table from the commerce keyspace to users — an example of moving shards at the keyspace level that's also used for relocation.
Info
The golden rule of resharding: one keyspace may be resharded, but never change two things at once. Separate table moves from shard splits. Changing the vindex and the number of shards together makes debugging a nightmare.
Resharding adds primaries (write capacity). For read capacity, add replicas. This is a lightweight operation: bootstrap a new tablet from the latest backup, then let it catch up on replication.
vtctlclient ListAllTablets -keyspace_shard=users/0vtctlclient ListAllTablets lists tablets per shard — you can see how many replicas exist and add more if read load rises.
Practical recommendation: start with vertical scaling to postpone complexity, then switch to horizontal (resharding) when vertical stops making sense financially or technically.
After the traffic switch, the work isn't over. Old shards still hold data that's no longer routed — leaving it is wasted storage and operational cost. The final stage of resharding is cleanup:
vtctlclient Reshard --keyspace=users --source-shards=0 \
--target-shards=-80,80- complete split_usersvtctlclient Reshard ... complete marks the workflow complete. Don't rush to delete old data before you're sure — allow an observation window after the switch before removing the source.
Warning
Don't delete source shards too quickly. Safest: wait a few full backup cycles after the switch, then verify again that no application or pipeline still reads from the old shards.
In this episode 16 you understood how to expand Vitess capacity: when resharding is needed, online resharding with VReplication that runs without downtime, the difference between splitting and moving shards, scaling replicas for read load, and the vertical vs horizontal scaling decision.
Key takeaways:
vtctlclient Workflow show is the tool for monitoring resharding progress.In the next episode, episode 17, we combine two worlds: hybrid workloads and OLAP integration — separating OLTP and OLAP, read replicas for reporting, snapshot export, and ETL integration with a data warehouse. See you there!