If the current zone in which your instance is deployed has insufficient resources for a specification upgrade or if you want to improve the disaster recovery capability, you can migrate the instance to another zone by using the ApsaraDB for Redis console or an API operation. After the instance is migrated to another zone, the data, accounts, and endpoints of the instance remain unchanged.
Prerequisites
The ApsaraDB for Redis instance has the following types of endpoints released:
If the instance has the preceding endpoints, release the endpoints before you migrate the instance. Otherwise, the Cross-zone Migration button is dimmed and the operation cannot be performed.
Precautions
When you migrate an instance across zones, transient connections may occur. We recommend that you perform this operation during off-peak hours and make sure that your application can automatically reconnect to your instance.
When you migrate an instance across zones, the Domain Name System (DNS) mapping of the instance may change. Make sure that you use an instance endpoint, such as
r-bp10b3fa3500****.redis.rds.aliyuncs.com
, to connect to the instance. In addition, earlier Jedis versions may not be able to obtain valid endpoints of the instance. You must update your Jedis client. For more information, see Notice on Jedis update.If an instance is deployed in a virtual private cloud (VPC), you cannot change the VPC when you migrate the instance across zones.
If the minor version of an instance is outdated, the system updates the instance to the latest minor version during migration to ensure better performance and stability.
Supported migration types and scenarios
Type | Scenarios |
Migrate an instance from one zone to another | The ApsaraDB for Redis instance is migrated to a zone where an Elastic Compute Service (ECS) instance is deployed. Then, the ECS instance can connect to the ApsaraDB for Redis instance over an internal network with lower network latency. |
Migrate an instance from a set of zones to another | |
Migrate an instance from one zone to multiple zones | You want to implement disaster recovery across data centers for the ApsaraDB for Redis instance. An ApsaraDB for Redis instance that is deployed in a single zone can tolerate server- and rack-level faults. An ApsaraDB for Redis instance that is deployed in multiple zones can tolerate data center-level faults. |
Migrate an instance from multiple zones to one zone | You want to migrate the ApsaraDB for Redis instance based on specific business requirements. |
Procedure
This operation may cause transient connections. We recommend that you perform this operation during off-peak hours and make sure that your application can automatically reconnect to your instance.
Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.
In the Basic Information section, click Cross-zone Migration to the right of Zone.
In the panel that appears, configure the parameters. The following table describes the parameters.
Parameter
Description
Destination Primary Zone
The primary destination zone to which you want to migrate the instance.
Destination Secondary Zone (optional)
The secondary destination zone to which you want to migrate the instance. If you configure this parameter, the replica node of the instance is migrated to this zone. This ensures cross-zone disaster recovery.
NoteIf you do not configure this parameter, the master and replica nodes of the instance are all migrated to the primary zone.
vSwitch
The destination vSwitch. If no vSwitch exists in the destination zone, you must create a vSwitch. For more information, see Create and manage a vSwitch.
NoteThis parameter is available only if the instance is deployed in a VPC.
Exec Time
Upgrade Now: After you click OK, the migration immediately starts. When the instance status changes to Running, the instance is migrated.
Switch within Maintenance Window (recommended): After you click OK, the pre-migration operations immediately start and the instance status changes to Migrating to Another Zone. During this process, the instance remains fully operational. The migration is not performed until the maintenance window starts.
For more information, see Configure a maintenance window.
Read the prompt and select the check box. Then, click OK.
Related API operations
API operation | Description |
Migrates an ApsaraDB for Redis instance across zones within the same region. |