Zero Downtime Migration | DataStax
Zero Downtime Migration
A database migration is always a delicate business. Even more so if, as is often the case in production, no downtime can be afforded. With enterprise migrations in mind, DataStax has developed, and open-sourced, a suite of self-service tools that make it possible to migrate any Cassandra/DSE/Astra database across clusters in a safe and reliable way and without impacting any running application.
Learn more and get first-hand experience of Zero Downtime Migration (ZDM) with our hands-on interactive labs!
The main idea of the Zero Downtime Migration is to set up a dedicated suite of proxies ("ZDM Proxies") which have access to both the Origin and Target databases. These proxies will "look like a regular Cassandra cluster" to all client applications, and will take care of managing all the intricacies of ensuring the same writes are forwarded to both databases at all times. The proxies also manage reads from the Origin database, the Target database, or even both at once (different read modes will be in place as the migration progresses through its phases). Configuration and deployment of the proxies, in turn, can be done in an automated fashion, for instance within Kubernetes or with the help of a "zdm-util" setup tool.
Once the pre-migration prerequisites are satisfied, the migration can start. The migration process is structured in five phases:
- Phase 1: deploying the ZDM Proxy and connecting client applications to it.
- Phase 2: migrating pre-existing data (there are specific tools for that).
- Phase 3 (optional): enabling dual reads to assess the performance of the Target database.
- Phase 4: performing all reads from the Target database.
- Phase 5: bypassing the ZDM Proxies altogether. Client applications connect directly to the Target.
This sequence of steps ensures that client applications will never experience service interruptions nor inconsistent data reads, in the same spirit as Cassandra's trademark continuous availability; moreover, the ZDM tools come equipped with a full observability suite, to easily monitor the performance throughout the process.
Want to get some hands-on experience? Give our interactive lab a try! It's ready in a couple of minutes and you can run it all in your browser, without installing anything.
Material related to Zero Downtime Migration
Full documentation on the Zero Downtime Migration process.
ZDM Proxy repository
Inspect and learn from the very source code of the ZDM Proxy powering your next zero-downtime migration.
ZDM Proxy automation
Learn how to deploy the ZDM Proxy in a fully-automated way by just providing the connection parameters and a few other settings.