ApsaraDB for MongoDB supports public endpoints. You can apply for a public endpoint for an ApsaraDB for MongoDB instance and use the public endpoint to connect to databases of the instance over the Internet. This topic describes how to apply for a public endpoint for an ApsaraDB for MongoDB replica set instance.

Background information

The following table describes the endpoint types supported by ApsaraDB for MongoDB instances.

Endpoint typeDescription
VPC endpoint
  • A virtual private cloud (VPC) is an isolated network that provides higher security and performance than the classic network.
  • By default, ApsaraDB for MongoDB provides VPC endpoints for instances to ensure high security and high performance.
Classic network endpointCloud services on the classic network are not isolated. Unauthorized access can be blocked only by using security groups or whitelists. You can switch the network type to VPC. For more information, see Switch the network type of an ApsaraDB for MongoDB instance from classic network to VPC.
Note The classic network is not supported for DynamoDB-compatible sharded cluster instances.
Public endpoint
  • Your ApsaraDB for MongoDB instance is at risk when you connect to it over the Internet. For this reason, ApsaraDB for MongoDB does not provide public endpoints by default.
  • If you want to connect to an ApsaraDB for MongoDB instance from a device outside Alibaba Cloud (such as an on-premise device), you must apply for a public endpoint.

Precautions

  • When you apply for a public endpoint for an instance, the instance may need to restart. We recommend that you perform this operation during off-peak hours.
  • If you want to connect to an ApsaraDB for MongoDB instance by using a public endpoint, you must add the public IP address of your client to a whitelist of this instance. For more information, see Configure a whitelist for an ApsaraDB for MongoDB instance.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and region to which the instance belongs.
  3. In the left-side navigation pane, click Replica set instances.
  4. On the page that appears, find the instance that you want to manage and click its ID.
  5. In the left-side navigation pane, click Database Connections.
  6. In the Public Connections section, click Apply for Public Connection String.
  7. Click OK.

Result

After you have applied for public endpoints, you can view the public endpoints in the Public Connections section. For more information about endpoints, see Connect to a replica set instance.

References