Read-Only Instance

Last updated: 2020-03-04 14:44:27


Operation Scenario

Tencent Cloud's CDB for MySQL allows users to create one or more read-only instances to support read-write separation and the "One Master, Multi-Slave" application scenario, thus greatly improving the read load capacity of user's database.
Unified read-write separation addresses (i.e., read and write requests are separated automatically) are not supported currently. RO instances need to be accessed with separate IPs and ports.


  • RO group : It consists of one or more load balancing-enabled RO instances. If there are multiple RO instances in one RO group, read request volume can be evenly distributed among the instances. RO groups provide IPs and ports for access to databases.
  • RO instance : A single-node (with no slave) instance that supports read requests. An RO instance cannot exist independently; instead, it must be in an RO group.

The MySQL master-slave binlog sync feature is adopted for RO instances, which can sync the changes in the master instance (source database) to all RO instances. Given the single-node architecture (without a slave) of RO instances, repeated attempts to restore a failing RO instance will be made. Therefore, you are recommended to choose an RO group over an RO instance for higher availability.

Use Limitations

  • RO instances are only available to High-IO master instances on MySQL 5.6 or higher with at least 1 GB of memory and 50 GB of disk capacity . If a master instance has a lower specification, please upgrade its specification first.
  • The minimum specification for read-only instances is 1GB memory and 50GB hard disk, and must be greater than or equal to 1.1x of the storage specification used by Master instance.
  • A master instance can create up to 5 RO instances.
  • Backup and rollback features are not supported.
  • Data cannot be migrated to an RO instance.
  • Database creation/deletion is not supported and neither is phpMyAdmin (phpMyAdmin.
  • Operations including account creation/deletion/authorization and account name/password modification are not supported.


  • There is no need to maintain account and database for read-only instance, which will be synchronized with those of the master instance.
  • If the MySQL version is 5.6 but GTID is not enabled, you need to enable GTID in the console first before creating an RO instance.
    Enabling GTID is very time-consuming and a flash of interruption lasting for a few seconds will happen to the instance, so it is recommended to perform the operation at the lows of business and add the reconnection mechanism in the program accessing the database.
  • Read-only instances support only the InnoDB engine.
  • Data inconsistency between multiple RO instances may occur due to the delays in data sync. You can check the delay in master-RO sync in the console.
  • The instance specification of a read-only instance can be inconsistent with that of Master instance, making it easy for users to upgrade according to the load. It is recommended that the instance specifications of read-only instances in the same RO group remain the same.


  1. Log in to the TencentDB for MySQL Console .
  2. In the instance list, select the instance for which to create a read-only instance and click Manage In the "Action" column.
  3. On the Instance Details Tab, click Add Read-Only Instance In the instance architecture to enter the RO instance management page.
  4. On the Read-only instance Tab, click CREATE .
  5. Select the desired configuration of the instance on the purchase page. After confirming that everything is correct, click Purchase Now .