This topic describes how to switch the virtual private cloud (VPC) and vSwitch of an ApsaraDB for MongoDB instance.
Prerequisites
The instance uses Enterprise SSDs (ESSDs) to store data.
Usage notes
A transient disconnection occurs during the switching. Make sure that your application can automatically reconnect to the instance.
If you switch the VPC and vSwitch of an instance, the virtual IP (VIP) of the instance changes. We recommend that you use high-availability connection string URIs in your application.
An instance cannot be operated in Data Management (DMS) and Data Transmission Service (DTS) for a short period of time until the VIP change in the instance is complete. For more information about DMS and DTS, see What is DMS? and What is DTS?
You fail to read data from or write data to an instance after you switch the VPC and vSwitch of the instance due to the Domain Name System (DNS) cache on your client. Clear the DNS cache on your client in a timely manner.
Procedure
Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.
In the Basic Information section, click Change Virtual Private Cloud next to Network Type.
In the Change Virtual Private Cloud panel, select the virtual private cloud and vSwitch that you want to switch.
Click OK.