This topic describes how to change the configurations such as specifications and storage space of one or more shard nodes in an ApsaraDB MongoDB sharded cluster instance.
Limits
Ensure that the following requirements are met:
- The storage space that you specify must be greater than or equal to the used storage space on the shard node.
- If the billing method of the instance is subscription, the number of read-only nodes that you specify must be greater than or equal to the number of read-only nodes for the shard node with the highest specifications in the instance.
- In a configuration change task, if you want to downgrade the specifications of a shard node, you cannot increase the number of read-only nodes of the instance.
Billing
For more information, see Configuration change fees.
Precautions
- During a configuration change, you may experience one or two transient connections.
Each transient connection lasts about 30 seconds. To prevent a configuration change
from interrupting your workloads, we recommend that you change configurations during
off-peak hours.
Notice If you change only the storage space of an instance, the system performs the corresponding operation based on whether your host has sufficient storage resources.
- If your host has sufficient storage resources, the system scales out the storage space on your host without the need for cross-host migrations or failovers. Transient connections do not occur during the scale-out process. The scale-out task is immediately executed to completion. You do not need to wait for the maintenance window.
- If your host does not have sufficient storage resources, cross-host migrations and failovers are required. Transient connections may occur during the scale-out process. The scale-out task is executed during the specified maintenance window.
- The amount of time required to perform a configuration change depends on factors such as the network conditions, task queue status, and data volume. We recommend that you change the configurations of a sharded cluster instance during off-peak hours and make sure that your application is configured to automatically reconnect to the instance.
- If the minor version of a sharded cluster instance expires or is not included in the maintenance list, ApsaraDB for MongoDB automatically updates the minor version of the instance to the latest version during a configuration change. This ensures that the sharded cluster instance can provide higher performance and higher stability.
Procedure
Related API operations
Operation | Description |
---|---|
ModifyNodeSpec | Changes the configurations of a mongos or shard node in an ApsaraDB for MongoDB sharded cluster instance. |
ModifyNodeSpecBatch | Changes the configurations of multiple mongos or shard nodes in an ApsaraDB for MongoDB sharded cluster instance. |