Best way to upgrade a 5.7 cluster?

Hi Yathur,

Thanks for reaching out.
Yes it is true that PS MySQL is having its EOL by October 2023 and it would be a wise idea to upgrade to 8.0

May I know what exact confusion you have from this link, so that I can guide you correctly. We are actively working to improve our document.

I understand that you have 3 node Percona Xtradb cluster with writes on only one node and before this layer, you have deployed HAproxy for load balancing and now you are planning to upgrade your all nodes to 8.0 version and would like to understand which approach is the best to adopt. Please correct me if I am wrong.

With my experience, I would recommend you to adopt the in-place which should have minimal downtime or negligible. I would recommend you to test it in testing environment first before moving it to the production and get familiar with 8 since MySQL has changed alot after 5.7 in terms of structure and feature. Check here. Below are the steps you can take.

  1. Stop read only node and replace the binary with 8.
  2. Restart it and let it re-join the cluster.
  3. Once everything is fine, do it same with other read only node.
  4. Switch your writes to upgraded one and move old master out of the cluster.
  5. Upgrade it and bring it back in the cluster.

Things to be cautious about :

  1. Your application should be capable to handle two nodes i.e. the lesser number of nodes and make sure no split brain situation will occur.
  2. While upgrading please switch off pxc_encrypt_cluster_traffic to OFF as it is ON by default in 8 and can create issues when data will flow from 5.7 to 8
  3. Keep pxc_strict_mode to PERMISSIVE as it is ENFORCING by default in 8 and if there is any incompatibility, it wont start the PXC. You can fix any incompatibility if any and then roll it back to ENFORCING.

Hope this helps