This topic describes how to add a shard node to an ApsaraDB for MongoDB sharded cluster instance.

Limits

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.

Billing

For more information, see Configuration change fees.

Precautions

  • 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.
  • When shard nodes are added, no transient connections occur and your business continues to run as expected.
  • Typically, shard nodes are added within 5 minutes. The time it takes to add shard nodes is not dependent on the number of shard nodes being added.

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. In the Shard List section of the Basic Information page, click Add Shard.
    Add a shard node
  6. In the Add Shard panel, set the following parameters.
    Note
    • When you change the value of the Storage Capacity parameter, you must make sure that the new storage capacity that you specify is greater than or equal to the largest storage capacity among all the shard nodes of the sharded cluster instance. To decrease the storage capacity of a shard node, you can create another instance to replace the existing one. 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 largest 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.
    Parameter Description
    Instance Specifications The specifications of the shard node that you want to add. For more information about the supported specifications of shard nodes, see Instance types.
    Quantity The number of shard nodes that you want to add.
    Note A maximum of 32 shard nodes can be added to each sharded cluster instance. If the sharded cluster instance already has three shard nodes and you want to add more shard nodes, you can add a maximum of 29 shard nodes to the sharded cluster instance. If you need more than 32 shard nodes in a sharded cluster instance, submit a ticket.
    Storage Capacity The storage capacity of the shard node that you want to add.
    Read-only Nodes The number of read-only nodes that you want to add. Valid values: 0 to 5.
    Note The number of read-only nodes can be specified only for subscription sharded cluster instances.
  7. Purchase the node.
    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. Then, the system automatically collects the amount.
    When nodes are being added to the sharded cluster instance, the instance is in the Creating Node state. Nodes are added to the instance when the state of the instance changes to Running.

Related API operations

Operation Description
CreateNode Add a shard or mongos node to an ApsaraDB for MongoDB sharded cluster instance.