You can change the configuration of a sharded cluster instance if the configuration is excessive or cannot meet the performance requirements of an application.

Precautions

  • To ensure data security, you can add shard nodes but cannot delete them.
  • When you change the configuration of a shard node, the new storage space must be larger than the storage space occupied by the current shard node.
  • If the billing method is subscription, you can only upgrade the configuration.
    Note You can use other methods to downgrade the configuration. For more information, see Configuration change overview.
  • You cannot change the instance type or storage engine of a sharded cluster instance. Creating a new instance will cause a long-period shutdown and have a great impact on the business. Therefore, we do not recommend this method.

Billing rules

For more information, see Configuration change fees.

Impacts

  • Changing configurations does not cause data loss.
  • You cannot specify switching time for the changed configuration of a sharded cluster instance. After you change the configuration in the console, the instance status changes to Changing Configuration immediately. When the instance is in this state, most operations related to databases, accounts, and network cannot be performed. One or two transient disconnections of up to 30 seconds will occur.
  • The duration of a configuration change depends on various factors such as network conditions, task queues, and data volume. We recommend that you change configurations during off-peak hours and make sure that your applications have automatic reconnection mechanisms.

Add a node

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the region of the instance.
  3. In the left-side navigation pane, click Sharding Instances.
  4. Find the instance and click its ID.
  5. On the Basic Information page, click the corresponding button to add a node.
    Add a node
    To add a Mongos node, perform the following steps:
    1. In the Mongos List section, click Add Mongos.
    2. On the Add Mongos page, specify Specifications of the Mongos node.
    To add a shard node, perform the following steps:
    1. In the Shard List section, click Add Shard.
    2. On the Add Shard page, specify Specifications and Storage of the shard node.
  6. Select ApsaraDB for MongoDB Terms of Service and make the payment as prompted.

Change the configuration of an existing node

For more information about instance specifications, see Instance types.

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the region of the instance.
  3. In the left-side navigation pane, click Sharding Instances.
  4. Find the instance and click its ID.
  5. On the Basic Information page, change the configuration of the corresponding node.
    To change the configuration of a Mongos node, perform the following steps:
    1. In the Mongos List section, find the Mongos node and choose More icon > Change Configuration.
      Change the configuration of a Mongos node
    2. On the Change Mongos Configuration page, specify Specifications of the Mongos node.
    To change the configuration of a shard node, perform the following steps:
    1. In the Shard List section, choose More icon > Change Configuration.
      Change the configuration of a shard node
    2. On the Change Shard Configuration page, specify Specifications and Storage of the shard node.
      Note If the billing method of the instance is subscription, you cannot downgrade the storage space of the shard node. You can use other methods to reduce the storage space. For more information, see Configuration change overview.
  6. Select ApsaraDB for MongoDB Terms of Service and make the payment as prompted.

Result

When the instance status changes to Running, the configuration has been changed.