This section describes how to modify the data replication mode of the RDS for MySQL instance.
Application Scenarios
RDS for MySQL supports the data replication mode for switching primary/standby instances, thus catering to different service requirements. You can select Asynchronous or Semi-synchronous. By default, the one-master-and-one-slave instance uses the asynchronous replication mode.
• Asynchronous:
When an application updates data, the Master promptly responds to the application upon executing the operation and replicates the data asynchronously to the standby instance. This data replication mode typically exhibits high performance.
Therefore, in asynchronous data replication mode, operations on the primary instance remain unaffected when the standby instance is unavailable. However, abnormal unavailability of the primary instance may affect the replication of the primary and standby data, resulting in inconsistency in the data of the primary/standby instances. In extreme cases, this may pose a risk of data loss, thus careful consideration is advised.
• Semi-synchronous:
When the application updates data, the Master must wait for the Slave to receive the log before responding to the application. This method enhances data reliability albeit with some performance impact.
In the semi-synchronous mode, if the Slave becomes abnormal, the Master will wait for several seconds for the Slave to respond. During this period, the Master's response to service write operations will be blocked until the following scenario occurs: If the Slave returns to normal, the Master resumes responding to the service write operations; If the Slave fails to return to normal within the specified waiting period, the instance will automatically switch to the asynchronous mode. After that, the Master will resume its response to write operations.
• Considerations for selecting the data replication mode:
You can select a data replication mode based on service requirements. The synchronous data replication mode is recommended if a faster response is required. In other cases, you can consider using semi-synchronization.
Constraints and Restrictions
• The instance status is Running.
• Modification of data replication mode is only supported by one-master-and-one-slave instances, but not by single instances.
• Instances with MySQL Group Replication (MGR) enabled do not support modification of data replication mode
Procedure
In the upper right corner of the homepage of eSurfing Cloud official website, select Console and log in to the Console interface.
In the upper left corner of the Product Overview page of the Console, click Console and select Region.
Select Database > Relational database... Go to the Relational Database Console.
On the Instance Management page, click the instance name.
On the Availability Management page, see the replication mode of the current database.
Select Modify data replication mode, Asynchronous or Semi-synchronous, and click Confirm.
Wait until the modification is complete and refresh the Availability Management page to see the new data replication mode.