This topic describes how to change the configurations of one or more mongos nodes in an ApsaraDB for MongoDB sharded cluster 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 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 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

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Sharded Cluster Instances.
  4. Find the target instance and click its ID.
  5. On the Basic Information page, select one or more mongos nodes.
    • Change the configurations of a mongos node
      In the Mongos List section of the page, find the mongos node. Click the More icon icon in the Actions column, and then select Change Configuration. Change the configurations of a mongos node
    • Change the configurations of multiple mongos nodes
      1. In the Mongos List section of the page, select multiple mongos nodes.
      2. Click Batch Reconfigure in the upper-right corner of the Mongos List section. Change the configurations of multiple mongos nodes
  6. In the Change Configuration panel, set the following parameters.
    Parameter Description
    Instance Specifications The new specifications of the mongos node.
    Note For more information about the supported specifications of mongos nodes, see Instance types.
    Migration Time The time when you want to apply the configuration change.
    • 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 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.
  7. 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 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.

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.