ApsaraDB for MongoDB allows you to manually release instances or nodes. You can release pay-as-you-go replica set or sharded cluster instances based on your business needs. After an instance is released, all data in the instance is lost and cannot be retrieved. You can also release mongos and shard nodes in sharded cluster instances. Data is not lost after a node is released.

Prerequisites

  • If you want to release an instance, the instance must be a pay-as-you-go replica set or sharded cluster instance.
    Note You cannot manually release a subscription instance. A subscription instance is automatically released when it expires.
  • 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.

Release an instance

  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 Replica Set Instances, or Sharded Cluster Instances based on the instance type.
  4. Click the More icon icon in the Actions column corresponding to the instance, and then select Release.
    Note For a replica set instance or a pay-as-you-go sharded cluster instance, you can release the instance in the following way:
    1. Find the instance and click its ID.
    2. In the Basic Information section, click Release.
  5. In the Release Instance message, click OK.

Release a specified node in a sharded cluster instance

  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.