All Products
Search
Document Center

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

Last Updated:Aug 01, 2024

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

  1. 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.

  2. 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

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

      2. 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.

  3. Configure the parameters described in the following table.

    Parameter

    Description

    Category

    The new category of the mongos node.

    Note
    • This 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:

      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.

  4. 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

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 shards nodes in an ApsaraDB for MongoDB sharded cluster instance.