An ApsaraDB for MongoDB sharded cluster instance consists of mongos, shard, and ConfigServer nodes. You can change the configurations of a mongos, shard, or ConfigServer node to meet the performance requirements of your sharded cluster instance.
You can start a configuration change task for multiple mongos, shard, and ConfigServer nodes in an ApsaraDB for MongoDB sharded cluster instance at a time. The task involves the following operations:
Change the specifications and storage capacity of one or more shard nodes.
Change the specifications of one or more mongos nodes.
Change the specifications and storage capacity of ConfigServer nodes.
When you change the configurations of the sharded cluster instance, you can deploy both the general-purpose and dedicated categories. You can change the category of a sharded cluster instance that uses cloud disks. This way, the category of each node in the instance is changed.
Billing rules
For more information, see Configuration change fees.
Usage notes
The new storage capacity that you specify is greater than or equal to the existing storage capacity of the sharded cluster instance.
The configurations of a ConfigServer node in a sharded cluster instance that uses local disks cannot be changed.
The number of read-only nodes in a shard component cannot be changed. To change the number of read-only nodes in the component, go to the configuration change page of the component. For more information, see Change the configurations of one or more shard nodes.
During a configuration change, the sharded cluster instance may experience one or two transient disconnections that each lasts about 30 seconds. To prevent a configuration change from interrupting your workloads, we recommend that you change configurations at a time that has minimal impact on your business.
ImportantIf you only change the storage capacity of a ConfigServer node, ApsaraDB for MongoDB performs different operations based on whether your host has sufficient storage resources:
If your host has sufficient storage resources, ApsaraDB for MongoDB scales up the storage capacity of your host without the need for cross-host migrations or failovers. Transient disconnections do not occur during the scale-up process. The scale-up 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 disconnections may occur during the scale-up process. The scale-up task is executed during the specified maintenance window.
Time required to complete a configuration change depends on various factors, such as network, task queue, and the number of nodes. We recommend that you perform a configuration change during off-peak hours and make sure that your applications can automatically reconnect to the instance.
If the minor version of a sharded cluster instance expires or is not maintained, 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 high performance and stability.
Procedure
Go to the Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.
In the Mongos List, Shard List, or ConfigServer List section of the Basic Information page, perform one of the following operations:
For a subscription instance, find the nodes whose configurations you want to change, click Batch Upgrade or Batch Downgrade in the lower part of the Basic Information page.
For a pay-as-you-go instance, find the nodes whose configurations you want to change, click Batch Reconfigure.
Configure the parameters described in the following table.
Parameter
Description
Category
The category used after the configuration change. Valid values:
Dedicated: Only dedicated mongos, shard, and ConfigServer nodes are displayed.
General-purpose: Only general-purpose mongos, shard, and ConfigServer nodes are displayed.
Hybrid deployment: Dedicated and general-purpose mongos, shard, and ConfigServer nodes are displayed.
NoteThis parameter is required only for ApsaraDB for MongoDB sharded cluster instances that use cloud disks.
If a category is not available for selection, it is not supported in the current zone.
For more information about the categories and specifications of ApsaraDB for MongoDB sharded cluster instances, see Sharded cluster instance types.
Specifications
The new specifications of the mongos, shard, and ConfigServer nodes.
Storage
The new storage capacity of the shard and ConfigServer nodes.
NoteThe new storage capacity that you specify must be greater than or equal to the maximum storage capacity of the ConfigServer nodes. To reduce storage capacity, you can create an instance and then migrate data to the instance. For more information, see Other configuration change scenarios and methods.
Switching Time
The time at which you want to apply the configuration change. Valid values:
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 within the maintenance window that you specify. You can select the current maintenance window or customize a maintenance window based on your business requirements. For more information about how to specify a custom maintenance window, see Specify a maintenance window.
Perform the corresponding operations based on the selected billing method.
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.
When the configuration change is being applied, the instance status is Changing Configuration. If the instance status changes to running, the configuration change is complete.
Related API operations
Operation | Description |
Changes the configurations of multiple mongos, shard, and ConfigServer nodes in an ApsaraDB for MongoDB sharded cluster instance in batch. |