All Products
Search
Document Center

ApsaraDB for MongoDB:Add a shard

Last Updated:May 07, 2026

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

Limitations

The specifications of a new shard must be greater than or equal to those of the highest-specification shard in the instance.

For example, if the highest-specification shard in the instance has a storage capacity of 10 GB, the new shard must have a storage capacity of at least 10 GB.

Billing

For more information, see Configuration change fees.

Usage notes

  • If your database's minor version is expired or no longer maintained, the system automatically upgrades it to the latest version to ensure better performance and stability.

  • Adding a shard does not affect application connections on mongos nodes or cause transient disconnections.

  • Typically, a shard is added within 5 minutes. The time required is independent of the number of shards being added.

  • After a shard is added, the Balancer might immediately start rebalancing data due to data imbalances between shards. This process increases instance load and consumes additional resources. We recommend monitoring the instance's resource utilization and considering setting a suitable balancing window. For more information, see Manage the MongoDB Balancer and Balancing.

Procedure

  1. Go to the Sharded Cluster Instances page. At the top of the page, select a resource group and a region. Then, click the ID of the target instance.

  2. In the Shard List section, click Add Shard.

  3. In the Add Shard panel, select a Category.

    Note
    • This parameter is available only for an instance that uses cloud disks.

    • You cannot select a category if it is not supported in the current zone.

    • For information about the categories and specifications of sharded cluster instances, see Sharded cluster instance specifications.

  4. In the Shard List panel, select the number of shards to add, and then click the Add Shard button.

  5. Configure the parameters for each new shard.

    Parameter

    Description

    Specifications

    Select the specifications of the shard.

    Storage

    Select the storage capacity of the shard.

    Note
    • The storage capacity of a new shard must be greater than or equal to the maximum storage capacity among existing shards. For example, if the largest existing shard has a storage capacity of 20 GB, the new shard must be configured with a storage capacity of 20 GB or more. To reduce storage capacity, you must create a new instance. For more information, see Other scenarios and solutions.

    • This storage capacity setting applies to all nodes in the shard, including any read-only nodes that you add.

    Read Only

    Select the number of read-only nodes to add. Valid values: 0 to 5.

  6. Complete the purchase based on the billing method.

    • Pay: Click Pay Now. The fee is automatically deducted within the next hour.

    • Pay: Click Pay Now. The fee is deducted immediately.

    While a shard is being added, the instance state is Adding Node. When the instance state changes to Running, the shard is successfully added.

Related APIs

API

Description

CreateNode

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