All Products
Search
Document Center

ApsaraDB for MongoDB:(Optional) Apply for a public endpoint for an ApsaraDB for MongoDB instance

Last Updated:Aug 19, 2024

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 type

Description

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 endpoint

Cloud services on the classic network are not isolated. Unauthorized access can be blocked only by using security groups or whitelists. For more information about how to switch the network type of an ApsaraDB for MongoDB instance from classic network to VPC, 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

  • Risks arise when you connect to your ApsaraDB for MongoDB instance over the Internet. In this connection, 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.

Usage notes

  • When you apply for a public endpoint for an ApsaraDB for MongoDB instance that uses local disks and runs MongoDB 3.2 or an earlier version, the instance is restarted. We recommend that you apply for a public endpoint for the instance during off-peak hours.

  • If you want to use the public endpoint allocated to an instance to connect to the instance, you must add the public IP address of your client to a whitelist of the instance. For more information, see Configure a whitelist for an ApsaraDB for MongoDB instance.

Procedure

  1. Go to the Replica Set 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.

  2. In the left-side navigation pane of the instance details page, click Database Connections.

  3. In the Public Connections section, click Apply for Public Connection String.

  4. In the Apply for Public Connection String panel, click Apply for Public Connection String.

Result

After you apply for public endpoints, you can view the created endpoints in the following sections. For more information about endpoints, see Connect to a replica set instance.

  • Connection Details section of the Basic Information page

  • Public Connections section of the Database Connections page

References