ApsaraDB for MongoDB allows you to manually release mongos and shard nodes in sharded cluster instances. Data is not lost after a node is released. This topic describes how to release a mongos or shard node.

Prerequisites

  • If you want to release a mongos node in a sharded cluster instance, the sharded cluster instance must contain three or more mongos nodes.
  • If you want to release a shard node in a sharded cluster instance, the sharded cluster instance must contain three or more shard nodes.
    Notice Before you release a shard node from a sharded cluster instance, make sure that the data of the shard node can be offloaded onto the remaining shard nodes in the sharded cluster instance. Otherwise, the sharded cluster instance stays in the Deleting Node state. In this case, you cannot perform the operations such as resetting the password, switching roles, modifying the node connection string, and modifying parameters.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Sharded Cluster Instances.
  4. Find the target instance and click its ID.
  5. Perform one of the following operations based on your node type:
    • Release a mongos node

      In the Mongos List section of the page, find the mongos node. Click the More icon icon in the Actions column, and then select Release.

      Release a mongos node
    • Release a shard node
      Notice Before you release a shard node from a sharded cluster instance, make sure that the data of the shard node can be offloaded onto the remaining shard nodes in the sharded cluster instance. Otherwise, the sharded cluster instance stays in the Deleting Node state. In this case, you cannot perform the operations such as resetting the password, switching roles, modifying the node connection string, and modifying parameters.

      In the Shard List section of the page, find the shard node. Click the More icon icon in the Actions column, and then select Release.

      Release a shard node
  6. In the Release Node message, click OK.
    When nodes are being released from the sharded cluster instance, the instance is in the Deleting Node state. When the status of the instance changes to Running, nodes are released from the instance.