Zero downtime migrations at petabyte scale
Aug 13, 2024Matt Lord

Summary
This post details PlanetScale's zero-downtime database migration process for petabyte-scale datasets, built upon Vitess's VReplication and `MoveTables` workflow. It outlines a 7-step migration process that includes taking consistent snapshots, continuous replication of changes, data verification via VDiff, a pre-cutover traffic routing phase (Application->PlanetScale->OldDB), transparent cutover with query buffering and pausing, and optional reverse replication for rollback. The post emphasizes that this process avoids downtime and data loss, and can be reversed if necessary. It also highlights that horizontal sharding is often a part of these migrations when databases exceed 250GiB.