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 VPC without a brief disconnection or network disconnection.
- The instance is a replica set or sharded cluster instance.
- The instance is in a classic network.
- A VPC is created in the same region as the instance. For more information, see Create a VPC.
In hybrid network access mode, you cannot switch the network type to Classic Network.
While 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 ECS instances in both the classic network and VPC.
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 a VPC.
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the region of the instance.
- In the left-side navigation pane, click Replica Set Instances or Sharding Instances.
- Find the instance and click its ID.
- In the left-side navigation pane, click Database Connection.
- In the Intranet Connection - Classic Network section, click Switch to VPC.
- In the VPC dialog box that appears, configure related parameters.
- Specify VPC and VSwitch.
- Turn on Retain the connection address of the classic network.
- Set Expiration Time (Days).
- Click OK.