This topic describes how to automatically or manually switch over services between the master and slave RDS for MariaDB instances. After the switchover, the master instance becomes the salve instance.

In the High-availability Edition, each instance (the master instance) has a slave instance, and data is synchronized between both instances in real time. You can only access the master instance. The slave instance works as a backup and cannot be accessed.

If the master instance cannot be accessed, your business is automatically switched over to the slave instance.

Precautions

During the switchover, your RDS instance may be disconnected. Make sure that your application can automatically reconnect to your RDS instance after the switchover.

Procedure

  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the instance is located.
    选择地域
  3. Find the instance and click the instance ID.
  4. In the left-side navigation pane, click Service Availability.
  5. In the Availability Information section, click Switch Primary/Secondary Instance.
    主备库切换
  6. Select an appropriate time to perform the switch, and click OK.

    During the switch, operations such as managing the databases and accounts and switchover the network types cannot be performed. Therefore, we recommend that you select Switch Within Maintenance Window.


    可维护时间内进行切换
    Note If you want to change the maintenance window, following these steps:
    1. Click Change.
      修改可维护时间
    2. In the Configuration Information section, select a maintenance window and click Save.
      选择可维护时间段
    3. Return to the Service Availability page, refresh the page, and perform the steps to switch the service.

APIs

Operation Description
SwitchDBInstanceHA Used to switch over services between the RDS master and slave instances.