Modify the data replication mode

Last Updated: Jul 24, 2017

For MySQL 5.5/5.6 instance, you can select its data replication mode based on your business characteristics to improve the availability of the RDS instance. This article introduces how to change the data replication mode.

Note: The Finance Edition instance has one master node and multiple slave nodes. This kind of instance only support the strong synchronous replication mode by default, which cannot be modified.

Background Information

MySQL 5.5/5.6 instance supports three kinds of replication mode, sync, semi-sync and async. You can select the proper replication mode as your business needs. The differences and features of the two replication modes are shown as follows.

  • Sync mode:

    • When the updates initiated by application are all executed in the master node, the log will be synchronously transferred to all the slave nodes. Only when most nodes (including the master node) in the cluster receive and store the log will the transaction complete the commit.

    • Only the instance that has 3 or more nodes supports the strong synchronous replication. In the strong synchronous replication, no matter what happens, the replication mode would not degrade into the asynchronous replication mode.

  • Semi-sync mode: Normally data is replicated in the sync mode. But if an exception occurs when the master node replicates data to the slave node, the data synchronization logic changes to the following:

    • When the slave node is unavailable or any network exception occurs between the master and slave nodes, the master node will suspend response to the application until the replication mode times out and degrades to async mode.

    • When data replication between the two nodes resumes normally (the Slave node or network connection is recovered), async mode will be changed to sync mode. The length of time to restore to the sync mode depends on the implementation mode of semi-sync mode. ApsaraDB for MySQL 5.5 is different from ApsaraDB for MySQL 5.6 in this regard.

  • Async mode: The application initiates an update (including the Add, Delete, and Modify operations) request. After completing the corresponding operation, the master node immediately responds to the application and then replicates data to the slave node asynchronously. Therefore, in the async mode, unavailability of the slave node does not affect the operation on the primary database, and unavailability of the master node has a low probability to cause data inconsistency between the two nodes.

Operation procedure

  1. Log on to the RDS Console.

  2. Select the region where the target instance is located.

  3. Click the ID of the target instance to visit the Basic Information page.

  4. In the left navigation bar, select Instance Availability.

  5. Click Modify Data Replication Mode, as shown in the following figure.

    Modify data replication mode

  6. On the Modify Data Replication Mode page, select a data replication mode, as shown in the following figure.

    Select replication mode

  7. Click OK.

Thank you! We've received your feedback.