This topic describes how to change the specifications of a sharded cluster instance. If the specifications of a sharded cluster instance are higher or lower than the specifications that are required for your business, you can change the specifications of the instance based on your business requirements.

Limits

  • You cannot change the instance type or storage engine of a sharded cluster instance.
  • The operations on the nodes of a sharded cluster instance are subject to the following limits.
    Operation Limit
    Add a shard node The specifications of the new shard node must be higher than or equal to the highest specifications among all the shard nodes of the sharded cluster instance.

    For example, if the largest storage capacity among all the shard nodes of a sharded cluster instance is 10 GB, the storage capacity of the new shard node must be greater than or equal to 10 GB.

    Change the specifications of a shard node The new storage capacity that you specify must be greater than the storage space that is used on the shard node.
    Note You cannot change the storage capacity of a sharded cluster instance that is charged based on the subscription billing method.
    Release a mongos node The number of mongos nodes must be greater than or equal to three.
    Release a shard node The number of shard nodes must be greater than or equal to three.

Billing

For more information, see Configuration change fees.

Precautions

  • During a specification change, you may experience one or two transient connections. Each transient connection lasts about 30 seconds. To prevent interruptions to your workloads, we recommend that you can set the switching time of a specification change to an off-peak hour.
    Note If you change only the Storage Space parameter, no transient connections occur.
  • The time that is required for a specification change varies based on factors such as the network conditions, task queue status, and data volume. We recommend that you change the specifications 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 specification change. This ensures that the sharded cluster instance can provide higher performance and higher stability.
  • Before you release a shard node from a sharded cluster instance, make sure that the shard nodes that you retain for the sharded cluster instance can offload the data of the shard node that you release. If the shard nodes that are retained cannot offload the data of the shard node that you release, the sharded cluster instance stays in the Deleting Node state. In this case, you cannot perform operations related to databases, accounts, or network settings.

Add a node to a sharded cluster instance

  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, perform the following operations:
    Add a node to a sharded cluster instance
    • Add a mongos node.
      1. In the Mongos List section of the page, click Add Mongos.
      2. In the Add Mongos pane, set the Instance Specifications parameter. For more information about the specifications that are supported by mongos nodes, see Instance types.
    • Add a shard node.
      Note
      • When you set the Storage Capacity parameter, the new storage capacity that you select must be greater than the largest storage capacity among all the shard nodes of the sharded cluster instance. If you want to reduce the storage capacity, you can create another sharded cluster instance. For more information, see Other configuration change scenarios and methods.
      • The specifications of the new shard node must be higher than or equal to the highest specifications among all the shard nodes of the sharded cluster instance. For example, if the highest storage capacity among all the shard nodes of the sharded cluster instance is 10 GB, the storage capacity of the new shard node must be greater than or equal to 10 GB.
      1. In the Shard List section of the page, click Add Shard.
      2. In the Add Shard pane, configure the Instance Specifications and Storage Capacity parameters. For more information about the specifications that are supported by shard nodes, see Instance types.
  6. Purchase the node.
    Perform the following operations based on the billing method of the sharded cluster instance:
    • If the sharded cluster instance is charged based on the pay-as-you-go billing method, read and select ApsaraDB for MongoDB Terms of Service and click Buy Now.
    • If the sharded cluster instance is charged based on the subscription billing method, read and select ApsaraDB for MongoDB Terms of Service and click Buy Now. On the Purchase page, complete the payment.
    When nodes are being added to the sharded cluster instance, the instance is in the Creating Node state. When the status of the instance changes to Running, nodes are added to the instance.

Change the specifications of a node of a sharded cluster instance

  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, perform the following operations:
    • Change the specifications of a mongos node.
      1. In the Mongos List section of the page, find the mongos node and in the Actions column click More icon to show more options. Then, click Change Configuration. Change the specifications of a mongos node
      2. In the Change Specification pane, configure the following parameters.
        Parameter Description
        Instance Specifications Specify the specifications of the mongos node. For more information about the specifications that are supported by mongos nodes, see Instance types.
        Migration Time Specify the time when you want to apply the specification change.
        • Switch Immediately after Migration: ApsaraDB for MongoDB applies the specification change immediately after you complete the payment.
        • Switch within Maintenance Window: ApsaraDB for MongoDB applies the specification 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.
          • In the Change Specification pane, click Edit next to Switch within Maintenance Window.
          • In the Specification Information section of the Basic Information page, click Edit next to Maintenance Period. For more information, see Specify a maintenance period.
    • Change the specifications of a shard node.
      Note The new storage capacity that you specify must be greater than the largest storage capacity among all the shard nodes of the sharded cluster instance. If you require less storage space, you can create another sharded cluster instance. For more information, see Other configuration change scenarios and methods.
      1. In the Shard List section of the page, find the shard node and in the Actions column click More icon to show more options. Then, click Change Configuration. Change the specifications of a shard node
      2. In the Change Specification pane, configure the following parameters.
        Parameter Description
        Instance Specifications Specify the specifications of the shard node. For more information about the specifications that are supported by shard nodes, see Instance types.
        Storage Capacity Specify the new storage capacity of the shard node.
        Note The storage capacity of a shard node cannot be decreased. If you require less storage space, you can create another sharded cluster instance. For more information, see Other configuration change scenarios and methods.
        Migration Time Specify the time when you want to apply the specification change.
        • Switch Immediately after Migration: ApsaraDB for MongoDB applies the specification change immediately after you complete the payment.
        • Switch within Maintenance Window: ApsaraDB for MongoDB applies the specification 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:
          • In the Change Specification pane, click Edit next to Switch within Maintenance Window.
          • In the Specification Information section of the Basic Information page, click Edit next to Maintenance Period. For more information, see Specify a maintenance period.
    When the specification change is being applied, the sharded cluster instance is in the Changing Configuration state. When the status of the instance changes to Running, the specification change is successfully applied.

Release a node of a sharded cluster instance

Related operations

Operation Description
CreateNode Add a shard node or mongos node to an ApsaraDB for MongoDB sharded cluster instance.
DeleteNode Release a shard node or mongos node from an ApsaraDB for MongoDB sharded cluster instance.
ModifyNodeSpec Changes the specifications and storage capacity of a shard node or mongos node of an ApsaraDB for MongoDB sharded cluster instance.