Migrate from Cassandra 3.x to 4.x

Video: Follow steps to upgrade your Cassandra cluster


This scenario is about migrating (upgrading) an existing Cassandra 3.x to Cassandra 4.x. Migration will be done on a node-by-node basis so that there will always be some nodes available to service client requests.

Next: Preparing for Migration

Preparing For Migration

It is important to verify that all the nodes are ready before beginning a migration.

  • All nodes must be running
  • All nodes need to have at least 50% disk space free
  • All errors need to be handled
  • Gossip needs to be operating properly
  • Backups and repairs must be disabled
Next: Zero Downtime Upgrades
Preparing For Migration
Zero Downtime Upgrades

Zero Downtime Upgrades

Upgrade one node at a time to allow clients to access the cluster during the process.

  • Operations at consistency level ALL must be temporarily reconfigured at a lower consistency level or they will fail
  • No DDL operations can be running during the upgrade (e.g. CREATE TABLE)
  • No DCL operations can be running during the upgrade (e.g. GRANT)

Resume normal operations after upgrading all nodes.

Next: How the Migration Works

How The Migration Works

Cassandra 4.x nodes can read Cassandra 3.x SSTable files so there is no need to upgrade the data files directly. The migration process is:

  1. Flush memtables to disk
  2. Shut down the 3.x node
  3. Make sure the correct Java version is installed
  4. Install Cassandra 4.x
  5. Configure the 4.x node to point to the old data files
  6. Start the 4.x node
  7. Check the logs for errors
Next: Other Considerations
How The Migration Works
Other Considerations

Other Considerations

  • Test the upgrade in a non-production environment first
  • Update client drivers if necessary
  • Run a full (application) regression test
  • Converting nodes one at a time may be time consuming in large clusters
Next: Skill Building

Skill Building

Want to get some hands-on experience? Give our interactive lab a try! You can do it all from your browser, it only takes a few minutes and you don’t have to install anything.