All Products
Search
Document Center

ApsaraDB for MongoDB:Add a shard node

Last Updated:Jul 12, 2024

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 shard node with the highest configurations in the sharded cluster instance has 10 GB of storage capacity, the storage capacity of the new shard must be greater than or equal to 10 GB.

Billing rules

For more information, see Configuration change fees.

Usage notes

  • 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 instance can provide higher performance and higher stability.

  • A transient disconnection does not occur and your business runs as expected when you add a shard node.

  • In most cases, shard nodes are added within 5 minutes. The amount of time required to add shard nodes is independent on the number of shard nodes that you want to add.

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 Shard List section of the instance details page, click Shard List.Add Shard

  3. In the Add Shard panel, configure the parameters described in the following table.Add Shard

    Parameter

    Description

    Category

    The category of the shard node that you want to add.

    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 specifications of the shard node that you want to add.

    Quantity

    The number of shard nodes that you want to add.

    Note

    You can add up to 32 shard nodes to an ApsaraDB for MongoDB sharded cluster instance. If the sharded cluster instance contains three shard nodes, you can add up to 29 shard nodes to the instance.

    Storage Capacity

    The storage capacity of the shard node that you want to add.

    Note
    • The storage capacity of the new shard node must be greater than or equal to the maximum storage capacity among existing shard nodes. For example, if the maximum storage capacity among existing shard nodes in the sharded cluster instance is 20 GB, the storage capacity of the new shard must be greater than or equal to 20 GB. To reduce storage capacity, you can create an instance and then migrate data to the instance. For more information, see Other configuration change scenarios and methods.

    • The Storage Capacity parameter also takes effect on read-only nodes in a shard node. If you add a read-only node when you add a shard node, the storage capacity that you specify applies to all nodes in the shard node.

    Read-only Nodes

    The number of read-only nodes that you want to add. Valid values: 0 to 5.

    Enable Shard Connection

    Specifies whether to enable shard connection. Valid values:

  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. Then, the system automatically collects the amount.

    When shard nodes are being added to the sharded cluster instance, the instance is in the Creating Node state. Shard nodes are added to the instance when the state of the instance changes to Running.

Related API operations

Operation

Description

CreateNode

Adds a shard or mongos node to an ApsaraDB for MongoDB sharded cluster instance.