This topic describes how to configure a hybrid access solution to switch the network type of an ApsaraDB for MongoDB instance from classic network to Virtual Private Network (VPC) without network interruptions.
- The ApsaraDB for MongoDB instance is a replica set instance or sharded cluster instance that runs MongoDB 4.2 or later. The protocol type of the sharded cluster instance is MongoDB.
- The network type of the instance is classic network.
- A VPC is created in the same region as the ApsaraDB for MongoDB instance. For more information, see Create a VPC and Create a vSwitch.
- In hybrid network access mode, you cannot switch the network type to classic network.
- When you switch the network type of an ApsaraDB for MongoDB instance from classic network to VPC, you can choose to retain the internal endpoints on the classic network for up to 120 days. In hybrid network access mode, the instance supports access from Elastic Compute Service (ECS) instances in both the classic network and VPCs.
- In hybrid network access mode, you can switch the network types of ECS instances and other Alibaba Cloud services from classic network to VPC until all services are deployed in VPCs.
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and the region of the target instance.
- In the left-side navigation pane, click Replica Set Instances, or Sharded Cluster Instances based on the instance type.
- Find the target instance and click its ID.
- In the left-side navigation pane, click Database Connections.
- In the Internal Connections - Classic Network section, click Switch to VPC.
- In the VPC panel, set the parameters.
- Set VPC and VSwitch.
- Turn on Retain the connection address of the classic network.
- Set Expiration Time (Days).
- Click OK.