ApsaraDB for MongoDB supports two network types: classic network and VPC. This topic describes how to configure a VPC for a new ApsaraDB for MongoDB instance.

Background information

On the Alibaba Cloud platform, a classic network and a VPC have the following differences:

  • On the classic network, cloud services are not isolated. You can configure a security group or whitelist policy for them to block unauthorized access.
  • A VPC helps you build an isolated network environment in Alibaba Cloud, where you can customize its routing table, IP address range, and gateway. In addition, you can use a physical connection or VPN to combine your user-created IDC with cloud resources in Alibaba Cloud VPC to create a virtual IDC, so that you can smoothly migrate your applications to the cloud.

ApsaraDB for MongoDB uses VPC by default. To this end, you need to create an ApsaraDB for MongoDB instance and a VPC in the same region as follows:

  • If you have not created an ApsaraDB for MongoDB instance, you can create a VPC first and create an ApsaraDB for MongoDB instance in the VPC following the procedure described in this topic.
  • If you have created an ApsaraDB for MongoDB instance, you can create a VPC in the same region and add the ApsaraDB for MongoDB instance to the VPC. For more information, see Switch the network type of an instance.

Procedure

  1. Create a VPC. For more information, see Create a VPC.
  2. Create an ApsaraDB for MongoDB instance in the same region as the VPC.
  3. When creating the ApsaraDB for MongoDB instance, select VPC as the network type on the instance creation page.
  4. Under VPC, select the configured VPC and VSwitch for VPC and VSwitch, respectively, as shown in the following figure.


  5. On the instance creation page, specify other configuration items as required. For more information, see the following links.