All Products
Search
Document Center

ApsaraDB for MongoDB:Release a mongos or shard node

Last Updated:Mar 28, 2026

Release mongos or shard nodes from a sharded cluster instance to reduce costs during off-peak hours or when nodes are underutilized.

Prerequisites

Before you begin, ensure that you have:

Usage notes

General:

  • The instance enters the Deleting Node state during the release process. Password resets, endpoint modifications, and parameter changes are unavailable in this state.

  • Release nodes during off-peak hours to minimize impact.

  • Confirm the node is no longer needed before releasing it.

Mongos nodes:

  • An instance must have at least two mongos nodes. If the instance has only two mongos nodes, neither can be released.

Shard nodes:

  • The following factors affect how long the release takes: the amount of data on the shard node, balancing windows, and jumbo chunks. For details, see Balancing Windows and Jumbo Chunks.

  • When a shard node is released, its data migrates to the remaining shard nodes. If the remaining nodes run out of storage space, the instance is automatically locked to prevent data loss.

  • If a duplicated key error occurs during data migration, check whether records with the same unique index field value exist. For example, different shard nodes may store two documents with different shard keys but the same primary key. The duplicated key error is returned when orphaned documents exist in the database. Delete orphaned documents before releasing the shard node.

Billing

Releasing a node is a configuration change and incurs fees. For details, see Configuration change fees.

Release a mongos or shard node

  1. Log on to the ApsaraDB for MongoDB console.

  2. In the left-side navigation pane, click Sharded Cluster Instances.

  3. In the upper-left corner, select the resource group and region of the instance.

  4. Click the instance ID, or click Manage in the Actions column.

  5. On the instance details page, release the target node based on its type:

    • Release a mongos node: In the Mongos List section, find the node and click the 更多 icon in the Actions column. Select Release.

    • Release a shard node: In the Shard List section, find the node and click the 更多 icon in the Actions column. Select Release.

      Make sure the remaining shard nodes have enough storage space before proceeding.

      When the shard node is released, its data migrates to the remaining nodes. If any remaining node runs out of space, the instance is automatically locked to prevent data loss.

  6. In the Release Node message, click OK.

    The instance enters the Deleting Node state.