Upgrading Aurora MySQL with a binlog replica

0

Hello,

we have an Aurora MySQL cluster (1 writer, 1 reader) that we want to upgrade to Aurora 3 / MySQL 8 – ideally using a blue/green deployment to minimize the downtime. However, we also have a separate database that replicates that cluster via binlog. We would not only like to upgrade that replica as well, but ideally without disrupting the replication throughout the process.

What are our options?

  • Can we blue/green deploy the replica as well without breaking the replication?
  • If not: Can we upgrade the replica in-place without breaking the replication? This would be an option if the downtime isn't too long (say, no more than 30 minutes).
  • What would happen to the replication if we blue/green deployed the upstream cluster?

Bonus question: Could we switch on the new enhanced binlog on the cluster without breaking the replication, or would we have to set up a new replica for that?

Thanks in advance.

asked 10 months ago376 views
1 Answer
0

Hello,

I understand that you want to upgrade your Aurora cluster to version 3 ideally using blue/green deployment but you also have a replica cluster that is replicating via binlog. You would ideally like to upgrade the replica as well without disrupting the replication.

Let me answer your queries regarding this, I am assuming that the replica is another Aurora DB cluster.

(1)Can we blue/green deploy the replica as well without breaking the replication?

You will not be able to upgrade the replica via blue/green as the source/blue instance cannot be a target of external replication. You will not be able to perform the switchover in this case.

[+]Limitations for blue/green deployments https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-overview.html#blue-green-deployments-limitations

(2)If not: Can we upgrade the replica in-place without breaking the replication? This would be an option if the downtime isn't too long (say, no more than 30 minutes).

You will need to first perform the major version upgrade on the replica cluster first, Then on the Primary cluster. Yes you can perform the in-place upgrade for the replica. There is no impact when upgrading an Aurora replica cluster. The slave cluster will incur an outage while the upgrade is in progress, but the Primary cluster will still be operational. Once the upgrade is completed, replication will resume and is expected to have a replica lag. The approximated downtime cannot be estimated as this depends on workload running on the DB, active transactions etc.

[+]How to perform an in-place upgrade https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.MajorVersionUpgrade.html#AuroraMySQL.Upgrading.Procedure

(3)What would happen to the replication if we blue/green deployed the upstream cluster?

You will be able to create the blue/green deployment for the upstream cluster as long as the replica is not a cross-region replica. I would recommend you to test this first in a test environment before implementing in production as this can possibly cause issues with the existing replica cluster.

[+]Limitations for blue/green deployments https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/blue-green-deployments-overview.html#blue-green-deployments-limitations

(4)Could we switch on the new enhanced binlog on the cluster without breaking the replication, or would we have to set up a new replica for that?

Yes enhanced binlog can be turned on without breaking the replication, Please note that enhanced binlog is only supported for Aurora MySQL 3.x (compatible with MySQL 8).

[+]Setting up enhanced binlog: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Replication.MySQL.html#AuroraMySQL.Enhanced.binlog

AWS
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions