All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Change the VPC or vSwitch of an instance

Last Updated:Mar 28, 2026

Move a Tair (Redis OSS-compatible) instance to a different virtual private cloud (VPC) or vSwitch without rebuilding the instance. Use this when your application and your Tair instance are in different VPCs and need to communicate over an internal network, or when you want to consolidate database resources under a shared CIDR block.

Important

The instance endpoint (for example, r-hp3bpn39cs1vu****.redis.hangzhou.rds.aliyuncs.com) does not change after the operation. Connect your applications to the instance using the endpoint rather than the virtual IP address (VIP).

Before you begin

Check whether your instance type is eligible. Not all instance types support this operation:

Instance typeSupported operation
Standard instanceChange VPC or vSwitch
Classic cluster instance (no private endpoint)Change VPC or vSwitch
Classic cluster instance (with private endpoint)Release the private endpoint first, change the VPC, then re-enable the private endpoint. See Enable the direct connection mode.
Cloud-native cluster instance (direct connection mode)Cannot change VPC

Also confirm the following:

  • Password-free access is disabled. If it is enabled, disable it before proceeding. See Enable password-free access.

  • No active Data Transmission Service (DTS) tasks. If a data migration or synchronization task involving this instance is running, the operation returns an error. See What is DTS?

Impacts

The following changes occur during and after the operation:

ImpactDetails
Connection interruptionApproximately 30 seconds. Perform the change during off-peak hours and make sure your application can automatically reconnect.
VIP changeThe VIP changes. Applications connected via VIP lose their connections when the VIP changes.
DMS interruptionData Management (DMS) connections drop briefly, then resume automatically.

Use cases

OperationWhen to use
Change the VPCA client cannot reach the instance because they are in different VPCs. For example, your ECS instance is in VPC A but your Tair instance is in VPC B. Move the Tair instance to VPC A to enable internal network communication.
Change the vSwitchGroup database-related resources (ECS instances and Tair instances) under the same vSwitch so they share a CIDR block and are easier to manage centrally.

Change the VPC or vSwitch

  1. Log on to the console and go to the Instances page. In the top navigation bar, select the region where your instance resides. Find the instance and click its ID.

  2. In the Basic Information section, click Modify next to the VPC ID.

    To change only the vSwitch, click Modify next to the vSwitch ID instead.
  3. In the panel that appears, select the VPC and vSwitch.

    If no VPC or vSwitch is available in the drop-down list, create them first. See Create and manage a VPC and Create and manage a vSwitch.
  4. Click OK.

    Warning

    The change causes a connection interruption of approximately 30 seconds. Perform this step during off-peak hours and confirm your application has automatic reconnect enabled.

  5. Read the confirmation message and click OK.

  6. After the change completes, clear the cache on your clients. Otherwise, clients may be unable to write data to the instance and can only read data from the instance.

API reference

APIDescription
SwitchNetworkChanges the VPC or vSwitch of an instance.