The mongos nodes of ApsaraDB for MongoDB sharded cluster instances can be connected to handle read and write requests. To read the oplogs of shard nodes or the configuration information of Configserver nodes, you can apply for endpoints for the corresponding types of nodes.
Prerequisites
A sharded cluster instance that runs MongoDB is created. For more information, see Create a sharded cluster instance.
Background information
A sharded cluster instance contains three types of nodes: mongos, shard, and Configserver nodes. You can configure the specifications and quantity of mongos and shard nodes to create ApsaraDB for MongoDB sharded cluster instances that have different performance capabilities. For more information, see Sharded cluster instances.
Limits
Endpoint application for a shard or Configserver node is not available for sharded cluster instances that run MongoDB 5.0 or 4.4.
Precautions
- After you apply for an endpoint for a shard node, the system creates an endpoint for the primary, secondary, and read-only nodes in the shard node respectively. Each endpoint has its own IP address. Before you apply for an endpoint, make sure that you have a sufficient number of available IP addresses.
- After you apply for an endpoint for a Configserver node, the system creates an endpoint for the primary and secondary nodes in the Configserver node respectively. Each endpoint has its own IP address. Before you apply for an endpoint, make sure that you have a sufficient number of available IP addresses.
- The network type of an endpoint that you want to apply must be the same as that of the current mongos node.
- You cannot modify the endpoint that is allocated to a shard or Configserver node.
- In this topic, the endpoint allocated to a shard or Configserver node is a private one. For Internet access, apply for a public endpoint. For more information, see (Optional) Apply for a public endpoint for an ApsaraDB for MongoDB instance.
Procedure
References
If you no longer need the endpoints of shard or Configserver nodes, you can release the endpoints. For more information about how to release an endpoint, see Release the endpoint of a shard or Configserver node.