Overview
The number of shards in a sharded cluster can be adjusted according to business traffic after purchasing the instance to adapt to changing business scenarios.
Description
Adjusting instance configuration will start billing according to the new configuration. Please ensure your Tencent Cloud account balance is sufficient. For more information, see Billing Instructions for Configuration Change.
Notes
New nodes join the cluster and start synchronizing data without affecting the business.
Do not initiate tasks to adjust the number of nodes, node computing specifications, and storage simultaneously.
After adjusting the number of nodes, start billing according to the new specifications.
After adjusting the number of nodes, the instance name, internal network address and port remain unchanged.
Once the configuration adjustment task is initiated, you cannot cancel this operation midway.
Reducing the number of shards is not allowed.
Prerequisites
You have created a TencentDB for MongoDB instance.
If it is an on-demand instance billing, please ensure your Tencent Cloud account balance is sufficient.
The sharding instance and its associated instances are in normal status (running) and are not currently executing any tasks.
Operation Steps
1. Log in to the TencentDB for MongoDB console.
2. In the left navigation bar, select Sharded Instance from the MongoDB drop-down list.
3. Select Region at the top of the Instance List page on the right.
4. In the Instance List, find the target instance.
5. Click its Instance ID to enter the Instance Details page, and click the Node Management tab.
6. On the Node Management page, under the Mongod Node tab, click Adjust Shard Count.
7. In the Adjust Shard Count dialog box, review the precautions for adjusting shard count, refer to the table below, specify the new shard count, and confirm the cost.

Parameter Name | Parameter interpretation | Parameter Example |
Instance Name | The instance name of the node quantity to be adjusted. | test-4dot2-XXX |
Expiration Time | Expiration time of the instance, reminding the expiration time for instances billed on a yearly or monthly basis. | 2022-04-24 19:23:43 |
Instance Architecture | Sharded cluster instance with 2 shards, each shard has 5 storage nodes. | |
Current Node Specifications | Specifications of a single shard node in the current sharded cluster instance, including cpu cores, memory, storage capacity, and number of nodes. | 2-core 4GB memory, 250GB storage, 10 nodes in total. |
Number of new shards | Select the number of additional shards for the instance, ranging from [current number of shards, 36]. | 3 |
Fees | Pay-as-you-go: hourly billing price after instance configuration adjustment. Click Billing Details to view billing items, billing formula, and confirm the cost. Annual and monthly subscription: increase the number of shards, display the required payment within the expiration time. | 6.69 CNY/hour |
8. Confirm no errors, click OK.
Relevant API
API Name | Interface Feature Description |
Modifying the configuration of TencentDB instance |