tencent cloud

TencentDB for MongoDB

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Strengths
Use Cases
Cluster Architecture
Product Specifications
Features
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
MongoDB Pricing
Billing Formula
Payment Overdue
Backup Space Billing
Configuration Adjustment Billing
Getting Started
Quickly Creating an Instance
Connecting to a TencentDB for MongoDB Instance
Reading/Writing Database
Operation Guide
Access Management
Instance Management
Node Management
Version Upgrade
Network Configuration
Monitoring
Backup and Rollback
Database Audit
Data Security
SSL Authentication
Log Management
Database Management
Multi-AZ Deployment
Disaster Recovery/Read-Only Instances
Parameter Configuration
Recycle Bin
Task Management
Performance Optimization
Data Migration Guide
Practical Tutorial
Optimizing Indexes to Break Through Read/Write Performance Bottlenecks
Troubleshooting Mongos Load Imbalance in Sharded Cluster
Considerations for Using Shard Clusters
Sample of Reading and Writing Data in MongoDB Instance
Methods for Importing and Exporting Data Based on CVM Connected with MongoDB
What to Do for Errors of Repeated Instance Creation and Deletion of Databases with the Same Names?
Troubleshooting MongoDB Connection Failures
Shard Removal Task: Guide for Confirming the Progress and Troubleshooting Issues
Performance Fine-Tuning
Ops and Development Guide
Development Specifications
Command Support in Sharded Cluster v3.2
Command Support in v3.6
Development Ops
Troubleshooting
Increased Slow Queries
Number of Connections Exceeding Limit
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Backup APIs
Account APIs
Other APIs
Task APIs
Introduction
Data Types
Error Codes
Instance Connection
Shell Connection Sample
PHP Connection Sample
Node.js Connection Sample
Java Connection Sample
Python Connection Sample
Python Read/Write Sample
Go Connection Sample
PHP Reconnection Sample
Product Performance
Test Environment
Test Method
Test Result
FAQs
Cost
Features
Sharded Cluster
Instance
Rollback and Backup
Connection
Data Migration
Others
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Cluster Architecture

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 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.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백