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.
- 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.
For more information, see Configuration change fees.
- 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
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.
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and the region of the target instance.
- In the left-side navigation pane, click Sharded Cluster Instances.
- Find the target instance and click its ID.
- On the Basic Information page, select one or more shard nodes. Note The new storage space that you specify must be greater than or equal to the largest storage space among all the shard nodes of the sharded cluster instance. To decrease the storage space of a shard node, you can create another instance to replace the existing one. For more information, see Other configuration change scenarios and methods.
- Change the configurations of a shard node
In the Shard List section of the page, find the shard node. Click the icon in the Actions column, and then select Change Configuration.
- Change the configurations of multiple shard nodes
- In the Mongos List section, select multiple shard nodes.
- Click Batch Reconfigure in the upper-right corner of the Shard List section.
- Change the configurations of a shard node
- In the Change Configuration panel, set the following parameters.
Parameter Description Instance Specifications The new specifications of the shard node.Note For more information about the specifications that are supported by shard nodes, see Instance types. Storage Capacity The new storage space of the shard node.Note The storage space of the shard node cannot be decreased. To decrease the storage space of the shard node, you can create another instance to replace the existing one. For more information, see Other configuration change scenarios and methods. Read-only Nodes The new number of read-only nodes.Note You can change the value of this parameter if the billing method of the instance is subscription. Migration Time The time at which you want to apply the configuration change.
Note If you scale out only the storage space of an instance and your host where the nodes reside has sufficient storage resources, the scale-out task is executed on your host and no cross-host migrations or failovers are required. In this case, the scale-out task is immediately executed to completion. You do not need to wait for the maintenance window.
- Switch Immediately after Migration: ApsaraDB for MongoDB immediately applies the configuration change after you complete the payment.
- Switch Within Maintenance Window: ApsaraDB for MongoDB applies the configuration change during the specified maintenance
window. You can view the maintenance window. You can also change the maintenance window
by using one of the following methods:
- Click Edit next to Switch Within Maintenance Window.
- Go to the Basic Information page. In the Specification Information section, click Edit next to Maintenance Period. For more information, see Specify a maintenance period.
- Perform the corresponding operations based on the selected billing method:
When the configuration change is being performed, the sharded cluster instance is in the Changing Configuration state. After the configuration change is performed, the state of the instance changes to Running.
- Pay-as-you-go: Click Pay Now. Then, the system automatically collects the amount in the next hour.
- Subscription: Click Pay Now. On the Purchase page, complete the payment process.
Related API operations
|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.|