This topic describes how to migrate an instance across zones in the ApsaraDB for Redis console. For example, if the current zone has insufficient resources to upgrade instances or you want to improve the disaster recovery capability, you can migrate an instance to another zone.

Prerequisites

The ApsaraDB for Redis instance has a classic network endpoint or a virtual private cloud (VPC) endpoint, and does not have the following endpoints:

Notice If the instance has the endpoints that are listed in the following table, release the endpoints before you migrate the instance. Otherwise, the Cross-zone Migration button is dimmed. The operation cannot be performed.
Endpoint Releasing method
Classic network endpoint that is retained when the network type is changed to VPC Release a classic network endpoint
Public endpoint Release public endpoints
Direct connection endpoint Release a direction connection endpoint

Precautions

  • When you migrate an instance across zones, the instance may experience transient connections for a few seconds. Make sure that your application is configured with a reconnection mechanism.
  • The duration of a migration depends on multiple factors, such as the network conditions, task queue status, and data volume. We recommend that you migrate an instance across zones during off-peak hours.
  • If you migrate an instance across zones, the virtual IP address (VIP) of the instance such as 172.16.88.60 is changed. However, the endpoint of the instance remains unchanged. We recommend that you connect to the instance by using the endpoint. If you use a VIP to connect to the instance, the connection fails.
  • If an instance is deployed in a VPC, you cannot change the VPC when you migrate the instance across zones.
  • To ensure better performance and stability, if the minor version of an instance is outdated, the system upgrades the minor version of the instance to the latest version during the migration process.

Supported migration types and scenarios

Migration type Scenario
Migrate an instance from one zone to another zone The ApsaraDB for Redis instance is migrated to the zone where an Elastic Compute Service (ECS) instance is deployed. Then, the ECS instance can connect to the ApsaraDB for Redis instance over the internal network with lower network latency.
Migrate an ApsaraDB for Redis instance from one zone to multiple zones You want to achieve disaster recovery across data centers for the ApsaraDB for Redis instance.

An instance that is deployed in one zone can handle server-level and rack-related faults. An instance that is deployed across multiple zones can handle data center-related faults.

Migrate an ApsaraDB for Redis instance from multiple zones to one zone You want to implement specific features.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the top navigation bar of the page, select the region where the instance is deployed.
  3. On the Instances page, click the ID of the instance.
  4. In the Basic Information section, click Cross-zone Migration.
    Migrate an instance across zones
  5. In the panel that appears, set the following parameters.
    Set migration parameters
    Parameter Description
    Destination Primary Zone Select the destination zone.
    VSwitch Select the destination vSwitch. If no vSwitch exists in the destination zone, you must create one. For more information, see Create a vSwitch.
    Note The parameter appears only when the instance runs in a VPC.
    Exec Time
    • Update Now: After you click OK, the migration immediately starts. When the instance status changes to Running, the instance is migrated.
    • Update During Maintenance: After you click OK, the system immediately performs tasks to prepare for the migration and changes the instance to the Migrating to Another Zone state. The instance will not be migrated to another zone until the specified maintenance window starts. For more information about how to modify the maintenance window, see Specify a maintenance window.
  6. Select the check box for the message and click OK.

Related operations

Operation Description
MigrateToOtherZone Migrates an ApsaraDB for Redis instance across zones in the same region.