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 |
|
Classic network endpoint | Cloud 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 |
|
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
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and region to which the instance belongs.
- In the left-side navigation pane, click Replica set instances.
- On the page that appears, find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Database Connections.
- In the Public Connections section, click Apply for Public Connection String.
- 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
- For more information about how to connect to an instance by using a public endpoint, see Connect to an ApsaraDB for MongoDB instance over the Internet.
- To ensure data security, you can release a public endpoint that you no longer need. For more information about how to release a public endpoint, see Release a public endpoint.
- Before you connect to a replica set instance over the Internet, we recommend that you enable SSL encryption. For more information, see Use the mongo shell to connect to an ApsaraDB for MongoDB database in SSL encryption mode.