This topic describes how to create an RDS for MySQL read-only instance. You can create read-only instances to process massive read requests sent to the database and increase the application throughput. A read-only instance is a read-only copy of the master instance. Changes to the master instance are also automatically synchronized to all relevant read-only instances.

For more information, see Introduction to MySQL read-only instances.

Prerequisites

The used DB engine version and edition are as follows:
  • MySQL 8.0 High-availability Edition (with local SSDs)
  • MySQL 5.7 High-availability Edition (with local SSDs)
  • MySQL 5.6

Precautions

  • You can create read-only instances in your master RDS instance. However, you cannot switch an existing instance to a read-only instance.
  • Creating a read-only instance does not affect your master RDS instance because the read-only instance copies data from the slave instance.
  • A read-only instance does not inherit the parameter settings of your master RDS instance. Instead, default parameter settings are generated. You can modify the parameter settings of a read-only instance on the RDS console.
  • The quantity of read-only instances is as follows.
    Database type Memory Max number of read-only instances
    MySQL ≥ 64 GB 10
    < 64 GB 5
  • A read-only instance is charged according to the Pay-As-You-Go billing method. Specifically, the fees for a read-only instance are deducted once per hour depending on the instance specifications. For more information, see the "Read-Only Instances" part at Pricing.

Create a read-only instance

  1. Log on to the RDS console.
  2. Select the region where the target instance is located.选择地域
  3. Find the target instance and click its ID.
  4. Click Add Read-only Instance.
    添加只读实例
  5. On the purchase page, choose the configuration of the read-only instance, and then click Buy Now.
    Note
    • We recommend that the read-only instance and the master instance be in the same VPC.
    • To guarantee sufficient I/O for data synchronization, we recommend that the configuration of the read-only instance (the memory) is greater than or equal to that of the master instance.
    • We recommend that you purchase multiple read-only instances based on your business needs to improve availability.
  6. On the Order Confirmation page, review the order information, select the terms and agreements as prompted, click Pay Now, and complete the payment.

    The instance creation takes a few minutes.

View a read-only instance

View a read-only instance in the instance list
  1. Log on to the RDS console.
  2. Select the region where the read-only instance is located.选择地域
  3. In the instance list, find the read-only instance and click its ID.
    查看只读实例

View a read-only instance on the Basic Information page for the master instance

  1. Log on to the RDS console.
  2. Select the region where the master instance is located.选择地域
  3. In the instance list, find the master instance and click its ID.查看主实例
  4. On the Basic Information page of the master instance, move the pointer over the number below Read-only Instance and click the ID of the read-only instance.添加只读实例

View the delay time of a read-only instance

When a read-only instance synchronizes data from the master instance, the read-only instance may lag behind the master instance by a small amount of time. You can view the delay on the Basic Information page of the read-only instance.

查看只读实例的延迟时间

APIs

API Description
CreateReadOnlyDBInstance Used to create an RDS read-only instance.