This topic describes how to create a read-only ApsaraDB RDS for MySQL instance. Read-only RDS instances help increase the read capability of your database system and the throughput of your application. Each read-only RDS instance is a replica of the primary RDS instance. This indicates that each read-only RDS contains the same data as the primary RDS instance. Data updates on the primary RDS instance are automatically synchronized to each read-only RDS instance.

For more information about how to create a read-only RDS instance that runs a different database engine, see the following topics:

For more information about read-only RDS instances, see Overview of read-only ApsaraDB RDS for MySQL instances.

Prerequisites

The primary RDS instance runs one of the following MySQL versions and RDS editions:

  • MySQL 8.0 on RDS High-availability Edition or RDS Enterprise Edition
  • MySQL 5.7 on RDS High-availability Edition or RDS Enterprise Edition
  • MySQL 5.6
Note If the primary RDS instance runs MySQL 5.7 on RDS Enterprise Edition but you cannot create read-only RDS instances,you must submit a ticket.

Precautions

  • You can create read-only RDS instances for the primary RDS instance. You cannot convert existing RDS instances to read-only RDS instances.
  • When a read-only RDS instance is being created, ApsaraDB RDS replicates data from the secondary RDS instance to the read-only RDS instance. This prevents interruptions to your workloads on the primary RDS instance.
  • After the primary RDS instance is released, the subscription read-only RDS instances of the primary RDS instance are automatically refunded and released, and the pay-as-you-go read-only RDS instances of the primary RDS instance are directly released.
  • A read-only RDS instance does not inherit the parameter settings of the primary RDS instance. ApsaraDB RDS generates default parameter settings for each read-only RDS instance. You can modify the parameter settings of a read-only RDS instance in the ApsaraDB RDS console.
  • The maximum number of read-only RDS instances that are can be created varies based on the memory capacity.
    Database engine Memory capacity Maximum number of read-only RDS instances
    MySQL ≥ 64 GB 10
    < 64 GB 5
  • Read-only RDS instances support both the pay-as-you-go billing method and the subscription billing method. For more information about the prices of read-only RDS instances, see Read-only ApsaraDB RDS instance types.
  • When you create a read-only RDS instance, you must select a virtual private cloud (VPC) that meets the specified requirements. For more information, see the "FAQ" section of this topic.

Create a read-only RDS instance

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the Distributed by Instance Role section of the Basic Information page, click Add to the right of Read-only Instance.
    Note If you are using the original ApsaraDB RDS console, click Create Read-only Instance in the Distributed by Instance Role section of the Basic Information page.
  3. Configure the following parameters.
    Parameter Description
    Billing Method
    • Subscription: A subscription instance is an instance for which you pay an upfront fee. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription periods.
    • Pay-As-You-Go: A pay-as-you-go instance is charged per hour based on your actual resource usage. For short-term use, we recommend that you select the pay-as-you-go billing method. If you no longer need a pay-as-you-go instance, you can release the instance to reduce costs.
    Zone A zone is an independent geographical location in a region. Zones in the same region do not have substantive differences.
    Instance Type
    • General-purpose (Entry-level): allows you to select a general-purpose instance type. A general-purpose RDS instance exclusively occupies the allocated memory and I/O resources, but shares CPU and storage resources with the other general-purpose RDS instances that are deployed on the same server.
    • Dedicated (Enterprise-level): allows you to select a dedicated instance type or a dedicated host instance type. A dedicated RDS instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. Dedicated host instance types provide the highest specifications in the dedicated instance family. A dedicated host RDS instance occupies all CPU, memory, storage, and I/O resources on the physical host where the RDS instance is deployed.
    Note Each instance type supports a specific number of cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary ApsaraDB RDS instance types.
    Capacity The maximum amount of storage capacity that is provisioned to store data files, system files, binary log files, and transaction files in the read-only RDS instance. You can adjust the storage capacity at a step size of 5 GB.
    Note The storage capacity of the read-only RDS instance must be equal to or greater than the storage capacity of the primary RDS instance to which the read-only RDS instance is attached.
  4. Click Next: Instance Configuration and configure the following parameters.
    Parameter Description
    Network Type
    • Classic Network: the traditional type of network.
    • VPC: the recommended type of network. A virtual private cloud (VPC) is an isolated virtual network that provides higher security and higher performance than the classic network. If you select the VPC network type, you must also specify the VPC and vSwitch of Primary Node parameters.
    Note The network type of the RDS instance must be the same as the network type of the Elastic Compute Service (ECS) instance that you want to connect. If the RDS instance and the ECS instance both reside in VPCs, these instances must reside in the same VPC. If the RDS instance and the ECS instance reside in different VPCs, these instances cannot communicate over an internal network.
    Resource Group The resource group to which the read-only RDS instance belongs.
  5. Click Next: Confirm Order.
  6. Confirm the settings in the Parameters section, specify the Purchase Plan and Duration parameters, read and select Terms of Service, click Pay Now, and then complete the payment. You must specify the Duration parameter only when the read-only RDS instance uses the subscription billing method.
    Note
    • If the primary RDS instance is charged based on the subscription billing method and you want to purchase a subscription read-only RDS instance, you can select Consistent with Primary Instance in the Duration section. This ensures that the read-only RDS instance has the same subscription period as the primary RDS instance.
    • If the read-only RDS instance that you create is charged based on the subscription billing method, we recommend that you select Auto-Renew Enabled. This reliefs the need to renew the read-only RDS instance on a regular basis and prevents interruptions to your workloads on the read-only RDS instance due to overdue payments.
    • If the primary RDS instance supports the dedicated proxy feature, you can select MySQL Dedicated Proxy Service (Paid Service) in the Confirm Order step for the instance. For more information, see What are database proxies?

View a read-only RDS instance

To view a read-only RDS instance on the Instances page, perform the following steps:

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the read-only RDS instance resides.
  2. Find the read-only RDS instance and click the instance ID.

To view a read-only RDS instance on the Basic Information page of the primary RDS instance, perform the following steps:

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the read-only RDS instance resides.
  2. Find the primary RDS instance and click the ID of the instance.
  3. In the Distributed by Instance Role section of the Basic Information page, move the pointer over the number of read-only RDS instances and click the ID of the read-only RDS instance that you want to view.

View the latency of data replication to a read-only RDS instance

A read-only RDS instance may synchronize data from the primary RDS instance at a specific latency. You can go to the Basic Information page of a read-only RDS instance to view the latency of data replication to the instance.

FAQ

  • When I create a read-only RDS instance, why am I unable to select a specific zone?

    The zone that you select does not have available resources. Select another zone and try again. This does not affect the read-only RDS instance.

  • When I create a read-only RDS instance, can I select a VPC that is different from the VPC of the primary RDS instance?
    • If the primary RDS instance resides in the classic network, you can select the classic network or a VPC. The selected VPC can be different from the VPC of the primary RDS instance.
    • If the primary RDS instance resides in a VPC:
      • You can select the classic network.
      • If local SSDs are used, you can select a VPC. The selected VPC can be different from the VPC of the primary RDS instance.
      • If standard SSDs or enhanced SSDs (ESSDs) are used, you can select only the VPC of the primary RDS instance.
  • When I create a read-only RDS instance, ApsaraDB RDS replicates data from the secondary RDS instance to the read-only RDS instance. This prevents interruptions to your workloads that are run on the primary RDS instance. What is a secondary RDS instance?

    If you are using the RDS High-availability Edition, your database system consists of a primary RDS instance and a secondary RDS instance. These instances work in the classic high-availability architecture. If the primary RDS instance becomes faulty, your database system fails over to the secondary RDS instance.

Related operations

Operation Description
Create a read-only instance Creates a read-only ApsaraDB RDS instance.