All Products
Search
Document Center

ApsaraDB for MongoDB:Overview of Changing Instance Configuration

Last Updated:Jul 08, 2026

Modify instance specifications, storage space, and node count to match your workload requirements.

Configuration change plans

The following table lists configuration change plans and supported changes for each instance type.

Configuration change plan

Billing method

Change type

Supported changes

Modify the configuration of a standalone instance

Subscription

Upgrade

Upgrade the instance Specifications and Storage space.

Downgrade

Downgrade the instance Specifications.

Pay-as-you-go

  • Upgrade

  • Downgrade

Modify the instance Specifications and Storage space.

Note
  • The new storage space must be greater than or equal to the current storage space.

  • MongoDB does not support storage space downgrades. To reduce storage space, create a new instance to replace the original one. Other scenarios and solutions.

Modify the configuration of a replica set instance

Subscription

Upgrade

Modify the number of primary and secondary nodes and read-only nodes, the Specifications, and the Storage space.

Note
  • When you change the Storage space, the new size must be greater than or equal to the current size.

  • After the Storage space is changed, the new value is applied to each node in the instance. This value is not the sum of the storage space of all nodes.

Downgrade

Modify the number of primary and secondary nodes, the number of read-only nodes, and the Specifications.

Pay-as-you-go

  • Upgrade

  • Downgrade

Modify the number of primary and secondary nodes, the number of read-only nodes, the Specifications, and the Storage space.

Note
  • When you change the Storage space, the new value must be greater than or equal to the instance's current storage space.

  • MongoDB does not support storage space downgrades. To reduce storage space, create a new instance to replace the original one. Other scenarios and solutions.

  • After the Storage space is changed, the new value specifies the storage space for each node in the instance. This value is not the total storage space for all nodes.

Modify the configuration of a sharded cluster instance

Subscription

Add Mongos nodes

When adding Mongos nodes, you can configure their Specifications and Quantity.

Note

A sharded cluster instance supports a maximum of 32 Mongos nodes by default. If a sharded cluster instance has 3 Mongos nodes, you can add a maximum of 29 Mongos nodes.

Add shard nodes

When you add shard nodes, you can configure Specifications, Quantity to create, Storage space, and the number of read-only nodes.

Note
  • A sharded cluster instance supports a maximum of 32 shard nodes by default. If a sharded cluster instance has 3 shard nodes, you can add a maximum of 29 shard nodes.

  • The Specifications, Storage space, and number of read-only nodes for each new shard node must be greater than or equal to those of the existing shard node with the highest configuration.

  • MongoDB does not support storage space downgrades for shard nodes. To reduce storage space, create a new instance to replace the original one. Other scenarios and solutions.

  • If you add read-only nodes when you add shard nodes, the storage space of the new shard node and each of its read-only nodes is equal to the storage space that you select for the new shard nodes.

Modify the configuration of Mongos nodes

Modify the Specifications of one or more Mongos nodes.

Modify the configuration of shard nodes

Modify the Specifications, Storage space, and the number of read-only nodes for one or more shard nodes.

Note
  • When you change the Storage space, the new value must be greater than or equal to the instance's current storage space.

  • MongoDB does not support storage space downgrades for shard nodes. To reduce storage space, create a new instance to replace the original one. Other scenarios and solutions.

  • After the Storage space of a shard node is changed, the new storage size applies to the shard node and all of its read-only nodes.

Modify the configuration of ConfigServer nodes

Modify the Specifications and Storage space of ConfigServer nodes.

Note
  • When you change the storage space, the new storage space must be greater than or equal to the current storage space of the node.

  • Instances that use local disks do not support modifying the configuration of ConfigServer nodes.

Modify the configurations of multiple components and nodes in a batch

Modify configurations of multiple components and nodes in a single task:

  • The specifications and storage space of one or more shard nodes.

  • The specifications of one or more Mongos nodes.

  • The specifications and storage space of ConfigServer nodes.

    Note
    • Instances that use local disks do not support modifying the configuration of ConfigServer nodes.

    • The configuration change limits for the selected components and node types apply.

    • To change the number of read-only nodes for a shard, you must modify the configuration of the individual shard node.

Pay-as-you-go

Add Mongos nodes

When adding Mongos nodes, you can configure their Specifications and Quantity.

Note

A sharded cluster instance supports a maximum of 32 Mongos nodes by default. If a sharded cluster instance has 3 Mongos nodes, you can add a maximum of 29 Mongos nodes.

Add shard nodes

When you add shard nodes, you can configure the Specifications, Quantity, and Storage space.

Note
  • A sharded cluster instance supports a maximum of 32 shard nodes by default. If a sharded cluster instance has 3 shard nodes, you can add a maximum of 29 shard nodes.

  • When you configure the Storage space, the value must be greater than or equal to the current storage space of the instance.

  • MongoDB does not support storage space downgrades for shard nodes. To reduce storage space, create a new instance to replace the original one. Other scenarios and solutions.

  • If you add read-only nodes when you add shard nodes, the storage space of the new shard node and each of its read-only nodes is equal to the storage space that you select for the new shard nodes.

Modify the configuration of Mongos nodes

Modify the Specifications of one or more Mongos nodes.

Modify the configuration of shard nodes

Modify the Specifications and Storage space of one or more shard nodes.

Note
  • When you change the Storage space, the new size must be greater than or equal to the current storage size of the instance.

  • MongoDB does not support storage space downgrades for shard nodes. To reduce storage space, create a new instance to replace the original one. Other scenarios and solutions.

  • After the Storage space of a shard node is changed, the storage space of the shard node and all of its read-only nodes is updated to the new capacity.

Modify the configuration of ConfigServer nodes

Modify the Specifications and Storage space of ConfigServer nodes.

Note
  • When you change the storage space, the new storage space must be greater than or equal to the current storage space of the node.

  • Instances that use local disks do not support modifying the configuration of ConfigServer nodes.

Modify the configurations of multiple components and nodes in a batch

Modify configurations of multiple components and nodes in a single task:

  • The specifications and storage space of one or more shard nodes.

  • The specifications of one or more Mongos nodes.

  • The specifications and storage space of ConfigServer nodes.

    Note
    • Instances that use local disks do not support modifying the configuration of ConfigServer nodes.

    • The configuration change limits for the selected components and node types apply.

    • To change the number of read-only nodes for a shard, you must modify the configuration of the individual shard node.

Release Mongos or shard nodes

Manually release Mongos or shard nodes.

Note
  • Release Mongos nodes only when the instance has three or more Mongos nodes. At least two Mongos nodes must be retained.

  • Release shard nodes only when the instance has three or more shard nodes. At least two shard nodes must be retained.

  • Before releasing a shard node, ensure that the remaining shard nodes have sufficient capacity for the data being released. Otherwise, the instance stays in Deleting Node status, and you cannot reset the password, switch roles, change node endpoints, or modify parameters.

Other scenarios and solutions

These scenarios require creating a new instance:

  • Downgrade the storage space of an instance or a shard node.

  • Increase the number of nodes for a standalone instance.

  • Change the architecture of an instance.

  • Change the storage engine from RocksDB or TerarkDB to WiredTiger.

To change the configuration in these scenarios:

  1. Create a new instance. For instructions, see Create a standalone instance, Create a replica set instance, or Create a sharded cluster instance.

    Note
  2. Migrate data from the original instance to the new instance. Data migration and synchronization.

  3. After verifying the new instance works as expected, switch your workloads to it.

  4. Optional: If the original instance is no longer needed, release the instance.

FAQ

After I upgrade the instance specifications, why does the performance not seem to improve?

Confirm the new specifications on the Basic Information page. Check CPU Usage and IOPS Usage on the Monitoring Information page. After a successful upgrade, these metrics typically decrease significantly.

Note

Do not use Memory Usage to evaluate performance. The WiredTiger cache size scales with instance specifications and is expected to occupy over 50% of available memory.

About 80% memory usage is normal for MongoDB instances. If usage is excessive, accelerate memory reclamation and tcmalloc memory release. High memory usage of a MongoDB instance.

How do I handle the "There is not enough resource for your operation." error?

This error message indicates that the destination zone has insufficient resources for the configuration change. You can try changing the instance to different specifications, or submit a ticket for technical support.

Related topics

Supported versions, storage engines, and constraints: Versions and storage engines.

To upgrade the major database version: Upgrade the major database version.