Mongos nodes route client requests to correct shards. When the traffic or the number of requests from the client increases and mongos nodes cannot effectively process all requests, you can change the configuration of the mongos nodes. You can change the configurations of one or more mongos nodes in an ApsaraDB for MongoDB sharded cluster instance. This topic describes how to change the configurations of one or more mongos nodes.
Billing rules
For more information, see Configuration change fees.
Usage notes
During a configuration change, one or two transient connections may occur. Each transient connection 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.
The amount of time required to perform a configuration change depends on factors such as the network conditions, task queue status, and data size. We recommend that you change the configurations of a sharded cluster instance during off-peak hours and make sure that your application 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 higher performance and higher 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 section of the instance details page, select one or more mongos based on your business requirements.
Change the specifications of a mongos node
Find the mongos node whose configurations you want to change and click the icon in the Actions column. Then, select Change Configurations for a pay-as-you-go sharded cluster instance or select Upgrade or Downgrade for a subscription sharded cluster instance.
Change the configurations of multiple mongos nodes
In the Mongos List section of the instance details page, select the mongos nodes that you want to manage.
In the upper-left corner of the Mongos List section, click Batch Change Configurations for a pay-as-you-go sharded cluster instance or click Batch Upgrade or Batch Downgrade for a subscription sharded cluster instance.
Configure the parameters described in the following table.
Parameter
Description
Category
The new category of the mongos node.
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.
Instance Specifications
The new specifications of the specified mongos node.
Switching Time
The time when you want the system 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. You can perform the following steps to customize a maintenance window:
Click Edit next to Switch within Maintenance Window.
In the Specification Information section, click Edit next to Maintenance Period to specify a maintenance window. For more information, 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 a mongos or shard node in an ApsaraDB for MongoDB sharded cluster instance. | |
Changes the configurations of multiple mongos or shards nodes in an ApsaraDB for MongoDB sharded cluster instance. |