All Products
Search
Document Center

Tair:Migrate an instance across zones

Last Updated:May 28, 2024

If the current zone in which your Tair 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 console or by calling an API operation. After the instance is migrated to another zone, information such as the data, accounts, and endpoints of the instance remains unchanged.

Prerequisites

The following types of endpoints are released for the Tair instance:

Note
  • If a public or private endpoint is not released for the instance, the Cross-zone Migration button is dimmed and the operation cannot be performed.

  • You cannot release private endpoints for cloud-native cluster instances in direct connection mode. Therefore, you cannot migrate cloud-native cluster instances across zones.

Impacts and 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.

Time consumed

The amount of time required to migrate an instance across zones varies based on factors such as network conditions, task queue status, and data volume. We recommend that you perform the operation during off-peak hours.

Supported migration types and scenarios

Type

Scenario

Migrate an instance from one zone to another

The Tair instance is migrated to a zone where an Elastic Compute Service (ECS) instance is deployed. The ECS instance can connect to the Tair instance over an internal network with lower network latency.

Migrate an instance from multiple zones to other zones

Migrate an instance from one zone to multiple zones

You want to implement disaster recovery across data centers for the instance.

An instance that is deployed in a single zone can tolerate server-level and rack-level faults. An 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 instance based on specific business needs.

Procedure

Warning

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.

  1. Log on to the Tair 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.

  2. In the Basic Information section, click Cross-zone Migration to the right of Zone.

  3. 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.

    Note

    If 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.

    Note

    This 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.

  4. Read the prompt and select the check box. Then, click OK.

Related API operations

API operation

Description

MigrateToOtherZone

Migrates a Tair instance across zones within the same region.

FAQ

Do the endpoints of a Tair instance change when I migrate the instance across zones? Are existing data, whitelists, and database accounts lost?

  • When you migrate a Tair instance across zones, the instance endpoints displayed in the console, such as r-bp10b3fa3500****.redis.rds.aliyuncs.com, do not change. However, the virtual IP address (VIP) and DNS mapping change. Take note of the following points:

    • Make sure that you use an endpoint, such as r-bp10b3fa3500****.redis.rds.aliyuncs.com, to connect to the instance.

    • If you use Jedis, make sure that the Jedis version is 3.10.0 or later. An earlier Jedis version may not be able to obtain valid endpoints. For more information, see Notice on Jedis update.

  • The migration does not cause data loss. You do not need to reconfigure the whitelists or database accounts.

Am I charged when I migrate a Redis instance from one zone to multiple zones?

You are not charged when you migrate a Tair instance from one zone to multiple zones.

Why am I unable to migrate my Tair instance to a secondary zone?

If your instance is a standalone instance, no replica node or secondary zone is available for the instance. In this case, you cannot migrate the instance to a secondary zone.

If a Tair instance is deployed in two zones, does the instance remain available when one zone fails?

Tair instances that are deployed in two or more zones can provide cross-zone disaster recovery. If one zone fails, the Tair instance in the other zones can continue to provide services.

How do I view the migration progress?

You can view the migration progress in the Task Center console.