tencent cloud

TencentDB for MongoDB

Deleting Secondary Node

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-09-22 21:55:10
AI翻訳

Overview

You can delete secondary nodes from a MongoDB instance when your business load decreases, when you need to optimize costs, or when you adjust the cluster architecture. This operation helps you achieve fine-grained resource management.
Node replacement and maintenance
If a secondary node has hardware or performance issues, you can first delete the problematic node and replace it with a new secondary node to smoothly replace and maintain the single node, ensuring service continuity for the cluster.
Resource Cost Optimization
You can delete redundant secondary nodes to avoid resource waste when resources were over-provisioned in the early stage to handle uncertain traffic, or when the business enters a stable or low period and read requests decline, leaving existing secondary node resources idle.

Impacts and Constraints

Before deleting secondary nodes, carefully read the following key information to ensure that the operation meets expectations and does not impact service stability.
Impact and Constraint
Description
Reduced high availability
Deleting a secondary node directly reduces the number of replica set members, thereby lowering the overall high availability level and failover capability of the cluster.
Mandatory system requirement
To ensure basic cluster stability, after deletion, maintain any of the standard configurations: 3 nodes (1 primary node and 2 secondary nodes), 5 nodes (1 primary node and 4 secondary nodes), or 7 nodes (1 primary node and 6 secondary nodes).
Hidden nodes cannot be deleted.
Hidden node: A special node reserved by the system for high availability and does not support manual deletion.
Core function: When a secondary node fails, the system automatically switches the failed node with a hidden node to keep the total number of nodes in the cluster unchanged and ensure continuous high availability.
Connection interruption and IP address release
After the deletion operation is performed, the service of this secondary node will be immediately terminated, and all business connections to this node will be disconnected.
The IP address bound to the deleted secondary node will be released immediately and will not be retained. If a new secondary node is needed, the system will assign a new IP address.

Prerequisites

The instance is in the normal state (running), and no tasks are currently being executed.

Deleting a secondary node (replica set)

2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance.
3. Above the instance list on the right, select the region.
4. In the instance list, find the target instance.
5. Click the Instance ID to enter the Instance Details page and click the Node Management tab.
6. On the Mongod Node tab on the Node Management tab, select the target secondary node in the Instance List and select Operation > Delete Secondary Node.
Note:
In the node list, if the value of a node in the Hidden column is true, the node is hidden and cannot be deleted.
7. In the Delete Secondary Node dialog box, review the notes on adjusting the number of nodes and confirm the instance name and expiration time of the node quantity adjustment.
Parameter
Parameter Description
Instance ID/Name
The name of the instance that requires node quantity adjustment.
Expiration time
The expiration time of the instance, specifically for subscription-based billing, serves as a reminder for the instance's expiration date.
Instance Specification
Check the current specification of the instance, including the CPU core quantity, memory, disk capacity, and node quantity. The node quantity includes all primary and secondary nodes. The nodes are evenly distributed to shards; for example, if there are two shards and eight nodes, each shard will have four nodes. You should determine the number of nodes to be deleted based on the current specification.
Secondary Node Information
Confirm the information of the secondary nodes to be deleted, including the node ID, AZ, role, and tags.
Specification Change Fees
Fee after the configuration adjustment. Pay-as-you-go: fee of the new specification per hour. Billing is divided into three tiers. Yearly/monthly subscription: total fee of the new specification for the remaining usable duration.
Compare
You can compare the specifications and maximum numbers of connections before and after the specification adjustment of mongod secondary nodes in order to assess whether the new specification meets your needs.
8. Confirm the billing information and click OK to complete the operation.
9. In the left sidebar, choose Task Management to view the ongoing task. Wait until the Task Progress reaches 100% and the Task Status changes to Completed.

Related APIs

API
Feature Description
Adjusts the cloud database instance configurations

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック