Databases 5 min read

CDB for MySQL Read-Only Instances and RO Group Architecture and Features

This article explains the architecture and key features of CDB for MySQL read-only instances and RO groups, including read-write separation, horizontal scaling, automatic load balancing, health checks, and dynamic instance removal for high-delay instances.

Tencent Database Technology
Tencent Database Technology
Tencent Database Technology
CDB for MySQL Read-Only Instances and RO Group Architecture and Features

As user business grows, read scalability often becomes essential. CDB for MySQL supports read-only (RO) instances and introduces the concept of RO groups to enable read-write separation and scale read capacity.

An RO group is a collection of read-only instances sharing a single access address via VIP:VPORT. Weights can be assigned to individual RO instances to achieve automatic load balancing. If an RO instance fails, traffic is redistributed transparently based on configured weights.

RO instances synchronize data with the primary instance via Binlog. While RO instance specifications may differ from the primary, it is recommended that they be equal or greater.

Key product features include:

Read-Write Address Separation : Primary and RO instances have distinct addresses; only the primary supports writes.

On-Demand Scaling : RO groups and instances can be horizontally scaled to meet increasing read demand.

Automatic Load Balancing : RO groups expose a single read endpoint; traffic is distributed by weight, with automatic rebalancing on instance failure.

Health Checks : CDB provides active probing, monitoring (down to minute-level, second-level soon), and alerting. Failed or isolated RO instances are automatically removed.

Per-RO-Group Parameter Configuration : Each RO group supports custom settings including:

Automatic Removal of High-Delay Instances : When enabled, instances exceeding the configured replication lag threshold are isolated; they are re-added once lag normalizes.

Rebalancing on Weight Changes : New weights take effect for new connections immediately. To force immediate rebalancing, existing connections are terminated and redistributed per the new weights.

Known Limitations : RO instances may lag behind the primary, so strong consistency reads must be performed on the primary.

Usage Guidance : For implementation details, refer to the official Tencent Cloud documentation:

Read-Only Instances

RO Group

load balancingMySQLReplicationRead-Write SeparationDatabase ScalingHealth CheckRead-Only InstancesRO Group
Tencent Database Technology
Written by

Tencent Database Technology

Tencent's Database R&D team supports internal services such as WeChat Pay, WeChat Red Packets, Tencent Advertising, and Tencent Music, and provides external support on Tencent Cloud for TencentDB products like CynosDB, CDB, and TDSQL. This public account aims to promote and share professional database knowledge, growing together with database enthusiasts.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.