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. |
Was this page helpful?