Hello Team,
I’m testing migration of Percona server (Master-Master) to Percona xtradb cluster. Need your help to have this migration steps planned without downtime to application in production.
Current production- Percona server Master -Master ( each master has two slaves)
Requirement- Migrate from Percona server to Percona xtradb cluster along with adding the 3rd master, meaning to have pxc setup with 9nodes,( 3masters each having 2 slaves)
Things to consider based on my environment setup.
- Node1 and Node2 have master-master percona server already configured and running. Installing PXC on the percona server, I will loose the data( meaning I will do an OS install of the machine)
- I cannot afford downtime to the application.
Thanks,
My concern here is that you might not understand how PXC operates. There are no “slaves” in PXC. Also, 9 nodes would not be supported. I would not recommend more than 5.
Steps: Upgrade one of the four existing replicas to PXC. You do not need to remove the data. Bootstrap this node. This starts the cluster. Replication from its source will resume. Go to another replica. Stop replication. Reset all replication (ie: erase replication configuration). Upgrade to PXC. Configure this node to join the cluster. Repeat for remaining replicas. Now you have Source/Source replicating into a 4-node cluster. Move all traffic to the source which is replicating into PXC. On the other source, remove replication as above. Then upgrade to PXC and join the cluster. Now you have 1 source replicating into a 5-node cluster. Stop application. Set old source to read-only. Wait for replication to catch up. Stop replica. Move application traffic to cluster. Shut down old source and destroy. Now you have a 5-node PXC with less than 30 seconds of downtime.
@matthewb Thanks for the explanation. But I have platform constraints, where I want to fit in the migration, could you please help.
My existing master-master percona server was in two dc’s, I have a requirement to add third dc, where I want to migrate to PXC to support multi-master.
So I’m planning to have 5node PXC setup as below. Can you please help me how can I achieve the migration with no downtime.
DC1 - Master1, slave1 ( current prod nodes)
DC2 - Master2, slave2 (current prod nodes)
DC3 - Master3(new)
Migration steps:
- App pointing to dc1, upgrade dc2 (master) to pxc, join it as first bootstrap node and slave2 as second node to pxc. Assuming dc2 master, will still be replicating from dc1 master
- Check for the replication and switch app to dc2 now pxc cluster with 2 nodes
- Upgrade dc1 master to pxc, join it as 3rd node to cluster
- Upgrade dc1 slave to pxc join it as 4th node to cluster
- New node in dc3,will be upgraded to pxc and joined as 5th node.
Please correct me and let me know the best approach in my case.
Thanks
1 Like