All Products
Search
Document Center

ApsaraDB for MongoDB:Change the configurations of one or more mongos nodes

Last Updated:Mar 18, 2024

Mongos nodes are used to route client requests to proper shard nodes. When mongos nodes cannot handle all requests in an efficient manner as a significant increase in the traffic or the number of requests from clients, you can change the configuration of the mongos nodes. This topic describes how to change the specifications of one or more mongos nodes in an ApsaraDB for MongoDB sharded cluster instance.

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

  1. Log on to the ApsaraDB for MongoDB console .

  2. In the left-side navigation pane, click Sharded Cluster Instances.

  3. In the upper-left corner of the Sharded Cluster Instances page, select the resource group and region to which the desired instance belongs.

  4. Click the ID of the instance or click Manage in the Actions column.

  5. In the Mongos List section of the instance details page, select one or more mongos nodes.

    • Change the configurations of a mongos node

      Click the 三个点 icon in the Actions column corresponding to the mongos node, and then select Upgrade or Downgrade.

    • Change the configurations of multiple mongos nodes

      1. In the Mongos List section of the instance details page, select the mongos nodes that you want to manage.

      2. Click Batch Upgrade or Batch Downgrade in the upper-left corner of the Mongos List section.

  6. In the Upgrade or Downgrade panel, configure the parameters described in the following table.

    Parameter

    Description

    Instance Specifications

    The new specifications of the mongos node.

    Note

    For more information about the specifications supported by mongos nodes, see Overview.

    Migration Time

    The time when you want the system 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 select the current maintenance window or customize a maintenance window based on your business requirements.

      1. Click Edit next to Switch within Maintenance Window.

      2. In the Specification Information section, click Edit next to Maintenance Period to specify a maintenance window. For more information, see Specify a maintenance window.

  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 applied, the instance is in the Changing Configuration state. When the configuration change is complete, 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.