This feature is an experimental variant of the MoveTables command that
allows you to migrate individual shards from one keyspace to another. Please be
sure to understand the limitations and requirements below.
The full set of options for the MoveTables command can be found here.
The options and other aspects specific to shard level migrations will be covered here.
The Mount and Migrate commands are the default
method provided for moving keyspaces from one Vitess cluster to another. This
method, however, only provides a one-time one-way cutover without the ability
to revert in the way that MoveTables does.
This feature introduces the concept of partial keyspaces where some shards are
served from a different keyspace during migration. This is useful for a specific
but critical use-case where a large production Vitess setup (100s of shards) is
being migrated to a new data center or provider. Migrating the entire cluster in
one go using MoveTables could cause an unacceptable downtime due to the large
number of primaries that need to be synced when writes are switched.
Supporting shard level migrations allows you to move very large keyspaces from one Vitess cluster
to another in an incremental way, cutting over traffic and reverting as needed
on a per-shard basis. When using this method, there is also a
flag that enables support for shard level query routing so that individual
shards can be routed to one side of the migration or the other during the
migration period — including when shard targeting is used.