tencent cloud

Cluster Architecture
Last updated: 2025-11-25 16:04:56
Cluster Architecture
Last updated: 2025-11-25 16:04:56

Replica Set Architecture

Architecture Overview

The TencentDB for MongoDB replica set adopts a multi-node deployment architecture to achieve high availability and read-write separation. Each replica set consists of one primary node, one or more secondary nodes, and a hidden node.
The system architecture diagram of the replica set is as follows:

Starting from version 4.0, the proxy set component is removed, enabling clients to connect to nodes directly, significantly improving performance.


Node Introduction

Node Type
Feature
Feature Description
Primary node
Handles all read-write requests from the client.
Each replica set has only one primary node to ensure data consistency.
Secondary node
Asynchronously replicates the primary node data to provide the read service.
Maintain data synchronization by polling the Oplog of the primary node.
It can participate in the election to become the new primary node when the primary node fails.
Hidden node
Data backup and high availability guarantee.
By default, one secondary node is specified as a hidden node, which can be quickly switched to a visible secondary node when a secondary node fails.

Sharded Clusters

Architecture Overview

The TencentDB for MongoDB sharded cluster architecture is built based on the replica sets and combines multiple replica clusters to achieve horizontal scaling of data, supporting massive data storage and high-concurrency access. Each sharded cluster instance consists of mongos nodes, config servers, and shard nodes. Each shard is an independent replica set, and users send requests to mongos, which then routes them to the appropriate shard.


Node Introduction

Component
Feature
Specification Configuration
mongos node
Handles request routing and load balancing by routing requests to the corresponding shards within the cluster and assembling the received responses to return them to the client.
3–32 nodes are supported, enabling load balancing and failover.
config server
Responsible for storing metadata information of clusters and shard nodes.
Fixed specification: 1 core and 2 GB; 20 GB disk, 3-replica set architecture.
Shard node
Stores data shards.
2–36 nodes are supported, enabling horizontal scaling of storage and concurrent processing capacity.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback