Updated on 2023-11-27 GMT+08:00

ALT Best Practices

Prerequisites

  1. Your application connects to the DB instance through a read/write splitting address.
  2. ALT is enabled. For details, see Enabling ALT.

Precautions

  1. This example describes how to perform a primary/standby switchover with ALT enabled. If you want to change the instance class or upgrade a minor version, see Changing a DB Instance Class or Upgrading a Minor Version.
  2. If a workload interruption occurs during the switchover, see Precautions and Constraints.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the primary instance name.
  5. In the DB Information area on the displayed Basic Information page, click Switch next to the DB Instance Type field.

    Alternatively, click Switch in the DB instance topology on the Basic Information page.

  6. If you have enabled operation protection, click Send Code in the displayed Identity Verification dialog box and enter the obtained verification code. Then, click OK.

    Two-factor authentication improves the security of your account. For details about how to enable operation protection, see the Identity and Access Management User Guide.

  7. In the primary/standby switchover dialog box, click OK.

    If the replication status is normal but the replication delay is too long, the switchover task may not be delivered. Trigger the task again during off-peak hours.

  8. After the switchover is successful, check the status of the DB instance on the Instances page.

    • During the switchover, the DB instance status is Switchover in progress.
    • Click the icon in the upper right corner to refresh the instance list. After the switchover is complete, the DB instance status becomes Available.