tencent cloud

Feedback

Adding Secondary Node

Last updated: 2024-04-02 15:54:16

    Overview

    All secondary nodes of an instance contribute to the system's high availability. When the primary node fails, each secondary node may be elected as the new primary node to execute data write requests. Therefore, the more the replicas, the higher the availability. In scenarios with a high number of concurrent requests with more reads and less writes, if read/write separation is enabled, you can add secondary nodes to improve the read performance and greatly relieve the read pressure on the primary node.
    A TencentDB for MongoDB cluster can have three (one-primary-two-secondary), five (one-primary-four-secondary), or seven (one-primary-six-secondary) nodes in total. You can add secondary nodes appropriately based on the surge in the concurrent requests to your business and remove secondary nodes when the business load drops. This helps you better utilize resources and reduce unnecessary costs in real time.

    Billing

    The instance will be billed by the new specifications after its specifications are changed. Make sure that your Tencent Cloud account balance is sufficient to cover the updated billing. For more information, see Specification Adjustment Billing.

    Notes

    After new nodes are added to the cluster, data sync will start without affecting the business.
    Be sure to plan for disaster recovery. We recommend you initiate a specification adjustment task during the maintenance period. For more information, see Setting Instance Maintenance Period.
    Do not adjust the node quantity and node computing/storage specifications at the same time.
    After the node quantity is adjusted, billing will start based on the new specification.
    The name, private network address, and port of the instance remain unchanged after node quantity adjustment.
    A started specification adjustment task cannot be canceled.

    Prerequisites

    If your instance is pay-as-you-go, make sure that your Tencent Cloud account balance is sufficient.
    The instance and its associated instances are in Running status and and there are currently no tasks being executed.

    Adding 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, click Add Secondary Node.
    7. In the Adjust Node Quantity pop-up window, read the notes on node quantity adjustment, and proceed to confirm and configure the parameters as detailed below:
    
    Parameter
    Description
    Instance ID/Name
    The name of the instance that requires node quantity adjustment.
    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. You should determine the number of nodes to be added based on the current specification.
    Add Node
    Select the number of secondary nodes to be added from the drop-down list.
    Deployment AZ
    This parameter will be displayed if the instance nodes are in the same AZ. It indicates the AZ where all instance nodes are deployed.
    Secondary Node-n
    This parameter will be displayed if the instance nodes are in different AZs. It indicates the AZs of different nodes and ranges from 0 to 6. Select the AZs for the new secondary nodes from the drop-down list.
    Fees
    Pay-as-you-go: Hourly unit price after instance speciation adjustment. You can click Billing Details to view the billable items and billing formula and confirm the fees.For more information, see Specification Adjustment Billing.
    8. Confirm the fees and click OK.
    9. On the left sidebar, select Task Management, and you can view the ongoing task. Wait until Task Progress becomes 100% and Task Status becomes Completed.

    Increasing the node quantity per shard (for sharded cluster instance)

    2. In the MongoDB drop-down list on the left sidebar, select Sharded Cluster 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, click Add Secondary Node.
    7. In the Adjust Node Quantity per Shard pop-up window, read the notes on node quantity adjustment, and proceed to confirm and configure the parameters as detailed below:
    The instance nodes are deployed in the same AZ:
    
    The instance nodes are deployed in different AZs:
    
    Parameter
    Description
    Instance ID/Name
    Confirm the name of the instance that requires node quantity per shard adjustment.
    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 added based on the current specification.
    Add Node
    Select the number of secondary nodes to be added per shard from the drop-down list.
    Deployment AZ
    This parameter will be displayed if the instance nodes are in the same AZ. It indicates the AZ where all instance nodes are deployed.
    Secondary Node-n
    This parameter will be displayed if the instance shard nodes are in different AZs. It indicates the AZs of different nodes and ranges from 0 to 6. Select the AZs for the new secondary nodes from the drop-down list.
    Fees
    Pay-as-you-go: Hourly unit price after instance speciation adjustment. You can click Billing Details to view the billable items and billing formula and confirm the fees.
    8. Conform the fees and click OK.
    9. On the left sidebar, select Task Management, and you can view the ongoing task. Wait until Task Progress becomes 100% and Task Status becomes Completed.
    API
    Description
    Adjust the specification of a TencentDB instance
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support