Switch a Tair (Redis OSS-compatible) instance from the classic network to a VPC for enhanced security and lower network latency.
Prerequisites
The instance uses the classic network.
You can find the network type in the Basic Information section on the instance details page.
Impacts
-
After switching to VPC, you cannot switch back to the classic network.
-
The instance briefly disconnects for a few seconds. Perform this operation during off-peak hours and ensure your application supports automatic reconnection.
Network types
|
Network type |
Description |
|
VPC (Recommended) |
A logically isolated private network on Alibaba Cloud with Layer 2 isolation for high security and performance. When your client runs on an ECS instance, connecting to a Tair (Redis OSS-Compatible) instance over a VPC provides lower latency and stronger isolation. |
|
classic network |
Cloud services share the network. Use security groups or IP address whitelists to block unauthorized access. |
A VPC client cannot connect to a classic network instance. Switch the instance to the same VPC as the client.
Procedure
Log on to the console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click its ID.
-
In the Connection Information section, click Switch to VPC Network on the right.
-
In the panel, configure the following parameters.
Parameter
Description
VPC
Select the target VPC and vSwitch.
NoteIf no VPCs or vSwitches are listed, none exist in the instance's region and zone. Create and manage a VPC and Create and manage a vSwitch.
For example, if your instance is in China (Hangzhou) Zone E and no vSwitches appear after selecting a VPC, that VPC lacks a vSwitch in Zone E. Create one first, then retry.
Virtual Switch:
Retain classic network endpoint
Choose whether to keep the classic network endpoint.
-
Retain: The instance keeps both endpoints. Clients can use either one. Migrate to the VPC endpoint before the classic network endpoint expires.
-
Do Not Retain: The VPC endpoint reuses the classic network endpoint, so no client-side changes are needed. Clients can only connect over the VPC.
Retention period
Number of days to keep the classic network endpoint. You can adjust this after the switch. Modify the retention period of a classic network endpoint.
-
-
Click OK.
FAQ
-
Q: Why can't I select a vSwitch when I switch to a VPC?
A: No VPCs or vSwitches exist in the instance's region and zone. Create and manage a VPC and Create and manage a vSwitch.
For example, if your instance is in China (Hangzhou) Zone E and no vSwitches appear after selecting a VPC, that VPC lacks a vSwitch in Zone E. Create one first, then retry.
-
Q: If an ECS instance and a Tair (Redis OSS-compatible) instance are in the same VPC but in different vSwitches (or zones), can it connect to the Tair (Redis OSS-compatible) instance over the VPC?
A: Yes. As long as the ECS instance and the Tair (Redis OSS-compatible) instance are in the same region and the same VPC, they can connect regardless of vSwitch or zone. Add the ECS instance's internal IP to the IP address whitelist of the Tair (Redis OSS-compatible) instance.
Related APIs
|
API |
Description |
|
Switches an instance from the classic network to a VPC. |