• Document Database Service

dds
  1. Help Center
  2. Document Database Service
  3. User Guide
  4. Introduction
  5. Replica Set Architecture

Replica Set Architecture

A replica set consists of a set of mongod processes and provides a collection of data nodes to ensure data redundancy and reliability.

NOTE:

A replica set consists of three nodes: primary, secondary, and hidden. The three-node architecture is automatically set up, and the three nodes synchronize data with each other automatically to ensure data reliability.

  • The primary node is used to read and write requests.
  • The secondary node is used to read requests.
  • The hidden node is used to back up data.

You can directly perform operations on the primary and secondary nodes. If a primary node goes down or becomes faulty, the replica set elects a secondary to be primary and continues normal operation. If a secondary node is unavailable, a hidden node will take the role of the secondary to ensure high availability. Figure 1 shows the replica set architecture.

Figure 1 Replica set architecture
  • Instance management: Supports multiple management and control tasks, such as creating instances, changing configurations, and backing up instances. The system flexibly controls and tracks tasks, and manages exceptions based on the operations delivered by users.
  • Performance monitoring: Collects performance monitoring information about DB instances, including basic metrics, disk capacity, access requests, and the number of operations.
  • Log collection: Collects logs about DB instance running status, including slow query logs and access control logs.
  • Backup and restoration: Backs up DB instance data and uploads it to OBS buckets. Currently, DDS supports automated and manual backup. Automated backups are kept for seven days by default.