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 Enterprise Edition
  • MySQL 5.7 on RDS High-availability Edition or Enterprise Edition
  • MySQL 5.6
Note If the primary RDS instance runs MySQL 5.7 on RDS Enterprise Edition, you cannot create read-only RDS instances.In this case, if you require read-only RDS instances, you must submit a ticket.

Precautions

  • You can create read-only RDS instances for primary RDS instances. You cannot convert existing primary RDS instances into 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. Visit the RDS instance list, select a region above, and click the target instance ID.
  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, you must 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 that you can subscribe to for a specified period of time and pay for up front. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You can receive larger discounts for longer subscription periods.
    • Pay-As-You-Go: A pay-as-you-go instance is charged per hour based on your actual resource usage. The pay-as-you-go billing method is suitable for short-term use. If you no longer require your pay-as-you-go instance, you can release the instance to reduce costs.
    Zone The zone of the read-only RDS instance. Each zone is an independent physical location within a region. Zones in the same region provide the same services.
    Instance Type
    • General-purpose (Entry-level): specifies the general-purpose instance family. A general-purpose instance exclusively occupies the allocated memory and I/O resources. However, it shares CPU and storage resources with the other general-purpose instances that are deployed on the same physical host.
    • Dedicated Instance (Enterprise-level): specifies the dedicated instance family or the dedicated host instance family. A dedicated instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. The dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host instance occupies all the CPU, memory, storage, and I/O resources on the physical host where it is deployed.
    Note Each instance type supports a specific number of cores, memory capacity, maximum number of connections, and maximum input/output operations per second (IOPS). For more information, see Primary ApsaraDB RDS instance types.
    Capacity The storage capacity that the read-only RDS instance has available to store data files, system files, binary log files, and transaction files. You can adjust the storage capacity in increments of 5 GB.
  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 VPC is an isolated virtual network that provides higher security and better 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 read-only RDS instance must be the same as the network type of the ECS instance that you want to connect. If the read-only RDS instance and the ECS instance both reside in VPCs, these instances must also reside in the same VPC. Otherwise, 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.
    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 relieves 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 Introduction to database proxies

View a read-only RDS instance

You can view a read-only RDS instance on the Instances page. To do this, 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 ID of the instance.

You can view a read-only RDS instance on the Basic Information page of the primary RDS instance. To do this, 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 primary 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 my workloads 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 read-only instance Creates a read-only ApsaraDB RDS instance.