Apply for or release public endpoints to connect to your ApsaraDB for MongoDB instance over the internet.
Connection types
ApsaraDB for MongoDB instances provide a private endpoint within a VPC by default. To connect over the internet, apply for a public endpoint.
|
Endpoint type |
Description |
|
Private endpoint (VPC) |
|
|
Public endpoint |
|
Apply for a public endpoint
Usage notes
-
For cloud disk instances, applying for a public endpoint may cause a transient disruption to existing connections. Perform this during off-peak hours and ensure your application supports reconnection.
-
Before connecting over a public endpoint, add your client's public IP address to the whitelist.
-
For sharded cluster instances on cloud disks, public endpoints can only be applied for Mongos nodes.
Procedure
-
Navigate to the MongoDB replica set instances page or the MongoDB sharded cluster instances page. Select a resource group and a region in the top navigation bar, and then click the ID of the target instance.
-
In the left-side navigation pane, click Database Connections.
Release a public endpoint
Usage notes
-
After you release a public endpoint, the endpoint becomes unavailable for connections.
-
After releasing a public endpoint, remove the corresponding public IP address from the whitelist for security.
Procedure
-
Navigate to the MongoDB replica set instances page or the MongoDB sharded cluster instances page. Select a resource group and a region in the top navigation bar, and then click the ID of the target instance.
-
In the left-side navigation pane, click Database Connections.
-
Follow the steps for your instance type.
Replica set/standalone instance
NoteReleasing a replica set instance's public endpoint also releases the endpoints for its primary and secondary nodes.
-
In the Public Connections section, click Release Public Endpoint.
-
In the Release Public Endpoint dialog box, click OK.
Sharded cluster
Note-
You can release public endpoints for individual Mongos, Shard, or ConfigServer components. Unreleased endpoints remain accessible. Sharded cluster architecture.
-
Releasing a Shard or ConfigServer endpoint also releases the endpoints for its primary and secondary nodes.
-
In the Public Connections section, find the endpoint that you want to release, and then click Release in the Actions column.
-
In the Release Public Endpoint dialog box, click OK.
To release the public endpoints for other nodes in the sharded cluster instance, repeat these steps.
-
FAQ
Q: Does applying for a public endpoint incur fees? Is public network bandwidth limited?
A: ApsaraDB for MongoDB instances do not have a public endpoint by default. Apply for one to enable internet access.
-
Billing: Public endpoints are currently free. Inbound and outbound public network traffic is also free of charge.
-
Bandwidth: No bandwidth limit is imposed on public network access. Actual speed depends on instance performance and network conditions.
Related topics
-
Connect to a MongoDB instance from a local client over the internet
-
Use SSL encryption for public endpoint connections. Connect to a database with SSL encryption by using the mongo shell.