tencent cloud

Feedback

Node Overview

Last updated: 2024-04-02 16:19:49
The replica set architecture of TencentDB for MongoDB achieves high availability and read/write separation by deploying multiple types of nodes. Each replica set instance consists of one primary node, one or multiple secondary nodes, and one hidden node.
The sharded cluster architecture implements the horizontal capacity expansion of data based on the replica set architecture by combining multiple replica sets, each of which is a shard.
Each node is as described below:
Node
Feature
Description
Primary node
It is responsible for handling read/write operations.
There can be only one primary node in each replica set instance.
Secondary node
It replicates the data of the primary node by periodically polling the oplogs of the primary node with data consistency guaranteed. When the original primary node fails, a new primary node will be elected from multiple secondary nodes to ensure the high availability.
When a client connects to a secondary node, it has read-only access and cannot write data.
In v4.2 and later, when a secondary node fails, the system will automatically replace it with the default hidden node to ensure the high availability of the secondary node.
A secondary node can be expanded as described in Adding Secondary Node.
A secondary node can be promoted to primary node as described in Promoting Secondary Node to Primary Node.
Hidden node
A secondary node will be designated as the hidden node by default for each newly purchased instance. When the primary node fails, the hidden node does not participate in the election of the new primary node. It only serves as an invisible replica node to back up data. When a secondary or read-only node fails, the system will automatically replace it with the hidden node as a new secondary or read-only node to achieve a high availability.
There can be only one hidden node in each replica set instance.
It is not possible to delete a secondary node that has been designated as a hidden node.
Read-only node
If the read-only replica feature is enabled, the system will set one or more secondary nodes as read-only nodes. Read-only nodes are primarily used in scenarios with a large volume of read requests. They synchronize data from the primary or secondary nodes through the operation log. The system automatically routes read requests to the read-only nodes to reduce the access pressure on the primary node.
Read-only nodes do not participate in the election of the primary node.
There can be multiple read-only nodes in each replica set instance. For more information, see Adding Read-Only Node.

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