tencent cloud

Feedback

Adding Read-Only Node

Last updated: 2024-04-02 15:38:50

    Overview

    When your business has a massive number of read requests, the primary and secondary database nodes may struggle to handle them, causing high latency, slow response, and severely dropped throughput. To solve this problem, TencentDB for MongoDB provides read-only nodes with an independent connection address, allowing data to be synced from a primary or secondary node with the lowest latency through oplog. You can create one or multiple read-only nodes to implement read/write separation and relieve the access pressure on the primary and secondary nodes.
    Two or more nodes can implement load balancing for read requests and guarantee a high availability; that is, when a read-only node fails, the system will automatically switch it with a hidden node. If automatic switch isn't performed, you can switch the node on the Node Management tab, and the connection address to the node will remain unchanged. You can directly get the connection string in the Network section on the Instance Details page.
    If a read-only node isn't in the candidate list of the primary node, it won't be elected as the primary node or participate in the election.

    Version Description

    TencentDB for MongoDB versions 4.0, 4.2, 4.4, and 5.0 support adding read-only nodes, while v3.6 doesn't.

    Directions

    2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance or Sharded Instance. The directions for replica set instances and sharded instances are similar.
    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, click Add Read-only Node.
    
    Parameter
    Description
    Instance Specification
    Check the current specification of the instance, including the CPU core quantity, memory, disk capacity, total node quantity, and read-only node quantity to evaluate the number of read-only nodes to be added.
    Add Read-Only Node
    The number of new read-only nodes. Value range: 0–5.
    AZ
    The AZ where all read-only nodes are deployed. This parameter will be displayed if the instance nodes are in the same AZ.
    Compare
    Compare the specifications before and after adding the read-only node to evaluate whether the new specification meets your needs.
    The specification of a replica set instance includes mongod specification, disk capacity, number of read-only nodes, and maximum number of connections.
    The specification of a sharded cluster instance includes number of shards, mongod specification, disk capacity, number of read-only nodes, and maximum number of connections.
    Total 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.
    7. Click OK.
    8. On the left sidebar, select Task Management. In the task list, find the instance by ID or name and wait until the Task Status for adding the read-only node is marked as Completed.
    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