CynosDB Architecture and Core Mechanisms: A Comprehensive Technical Overview
CynosDB is Tencent Cloud’s high‑performance, highly‑available NewSQL distributed database that uses a shared‑storage architecture with primary and replica instances, log‑structured storage, RDMA/SPDK transmission, Raft consensus, SSI MVCC, two‑phase locking, and state‑machine replication to provide elastic scaling, fast recovery, and cost‑effective enterprise data management.
This article provides a comprehensive technical overview of CynosDB, a next-generation high-performance, highly available enterprise-grade distributed cloud database developed by Tencent Cloud. The database adopts a shared storage architecture and is part of Tencent Cloud's NewSQL database family, offering elastic scheduling, dynamic scaling, and cost savings for enterprises.
The architecture section explains that CynosDB consists of two types of database instances: primary instances (read-write) that handle all database operations including updates, DDL, and DCL, and replica instances (read-only) that balance read operations and improve availability by being placed in separate availability zones. The system uses multiple dedicated networks for communication, including customer VPC for application interaction, management network for agent processes to communicate with control platforms, and storage network for database engine interaction with storage services.
The data model section describes CynosDB's storage organization using segments, blocks, and pages. A segment is the minimum unit for data management (fixed at 10GB), while a block is the smallest data organization unit (8KB) containing page header data, row pointer arrays, and tuples. The article provides detailed information about PostgreSQL's page header structure and buffer management mechanisms.
The storage model section explains CynosDB's use of log-structured storage with write-ahead logging (WAL) and block read operations. The system employs RDMA/SPDK for efficient data block transmission and Raft consensus for maintaining consistency across storage replicas. The write process involves creating SLOG (Segment LOG) records for all data modifications, which are then distributed to segment groups and committed in batch groups.
The transaction and concurrency section discusses CynosDB's use of Serializable Snapshot Isolation (SSI) for MVCC-based DML operations and two-phase locking for DDL operations. The cache management section details buffer management including buffer tables, descriptors, and pools, along with the clock-sweep algorithm for page replacement.
The recovery mechanism section highlights CynosDB's use of state machine replication technology to avoid traditional ARIES-style recovery, enabling fast startup by reconstructing runtime state through coordination with storage services. The article also covers related concepts such as transaction logs, LSN (Log Sequence Number), WAL, PostgreSQL transaction IDs, tuples, visibility rules, and commit logs.
The comprehensive technical content makes this article valuable for database professionals, researchers, and students interested in modern distributed database systems and NewSQL architectures.
Tencent Cloud Developer
Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.