Upgrading Percona 5.7 to 8.0 Using Asynchronous Replication

Hello,

I have a Percona XtraDB Cluster running 5.7 that I need to upgrade to 8.0. I found this article in the forums that suggested three possible routes for performing this upgrade. Best way to upgrade a 5.7 cluster?

  1. High downtime - stop all 5.7 nodes. replace PXC packages with 8.0. Start one node PXC 8 in bootstrap mode. Join the other two nodes.
  2. Several seconds downtime: Configure a new cluster running PXC 8. Replicate data from PXC 5.7 → PXC 8 using asynchronous replication. Stop writes on PXC 5.7, point application to read/write from PXC 8.
  3. Zero downtime: stop a member of the PXC 5.7 cluster. replace PXC packages with 8.0. Start this PXC 8.0 node and let it join the PXC 5.7 cluster. Then upgrade the remaining PXC 5.7 → PXC 8.0

I cannot afford significant downtime on my cluster, and I don’t believe option 3 is available to me since I don’t have read only nodes in my cluster. Option 2 seems like the best solution for me, but I am unable to find any information regarding how to actually set it up.

How do I configure my 5.7 cluster to replicate itself to my new 8.0 cluster?

Thank you,
Alex

1 Like

You should, as that is the recommend, best practice for using PXC. PXC operates best with a single writer. PXC is not a write-scaling solution, so writing to multiple nodes only increases your chances of brute-force-aborts (ie: deadlocks) between nodes.

It’s just like setting up regular async replication. Pick a node in the 5.7 PXC to be the source, pick a node in PXC 8 to be the replica. Set up replication between these two just like you would with regular mysql. Take a backup of one node of 5.7, restore to node1 on pxc 8. bootstrap this node. have node2 and node3 pxc8 join. Then configure async replication.

1 Like