If all nodes of the primary instance in a Global Active Database (GAD) instance group for ApsaraDB RDS for MySQL become unavailable, you can use a one-click switchover to promote a secondary instance to the primary role. After the switchover, the formerly read-only secondary instance becomes a read-write primary instance, quickly restoring service. This feature supports scenarios such as disaster recovery (DR) drills and geo-disaster recovery switchovers.
Prerequisites
-
The Global Active Database (GAD) instance group must be in the Running state.
-
The instance group must be of the Disaster Recovery type. For more information about the differences between DR and active geo-redundancy, see Disaster recovery and active geo-redundancy.
Considerations
-
A forced switchover risks data loss and may cause a brief connection interruption. Proceed with caution. Perform the operation during off-peak hours and ensure that your application has an automatic reconnection mechanism.
-
If you use unidirectional synchronization with Data Transmission Service (DTS), a forced switchover removes the original primary instance and all other secondary instances from the GAD instance group. The switchover then terminates the DTS synchronization link. Proceed with caution.
However, the removed ApsaraDB RDS for MySQL instances are not released. Their data and DTS synchronization accounts are preserved. You can find these instances on the Instances page.
NoteAfter the switchover is complete, you can re-add the removed instances to the GAD instance group as secondary instances.
Procedure
-
Go to the Global Active Database page.
-
On the Global Active Database page, click the ID of the target instance group.
-
In the List of RDS instances section, find the secondary instance to promote. In the Actions column for that instance, click Switch to Primary Instance.
-
Review the impacts of the switchover, and then click Switch.
Related operations
After the switchover is complete, consider updating the endpoint in your application to the endpoint of the new primary instance.