All Products
Search
Document Center

ApsaraDB for MongoDB:Add a shard node

Last Updated:Feb 06, 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 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 left-side navigation pane, click Sharded Cluster Instances.

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

  4. Click the ID of an instance, or click More icon in the Actions column corresponding to the instance and select Manage.

  5. In the Shard List section, click Add Shard in the upper-right corner of the section.

  6. In the Add Shard panel, specify 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.

    • If read-only nodes are added when you create a shard node, the specified storage capacity value is applied to the shard node and each read-only node.

    Parameter

    Description

    Specifications

    The specifications of the shard node that you want to add. For more information about the supported specifications of shard nodes, see Overview.

    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.

    Storage

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

    Note

    If read-only nodes are added when you create a shard node, the specified storage capacity value is applied to the shard node and each read-only node.

    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.

    Enable Shard Connection

    Specifies whether to enable shard connection. Default value: No. Valid values:

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

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