This topic describes how to create a read-only ApsaraDB RDS for MySQL instance. Read-only RDS instances allow your database system to process a large number of read requests. This increases the throughput of your application. Each read-only RDS instance is a replica of the primary RDS instance. This means that each read-only RDS has the same data as the primary RDS instance. Data updates on the primary RDS instance are also synchronized to each read-only RDS instance.

For more information about how to create a read-only RDS instance that run other database engines, see the following topics:

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

Prerequisites

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

  • MySQL 8.0 in the High-availability Edition or Enterprise Edition
  • MySQL 5.7 in the High-availability Edition or Enterprise Edition
  • MySQL 5.6
Note If your instance running MySQL 5.7 in the Enterprise Edition does not support read-only instances, submit a ticket.

Precautions

  • You can create read-only RDS instances for the primary RDS instance. However, you cannot convert existing RDS instances into read-only RDS instances.
  • When you create a read-only RDS instance, ApsaraDB RDS replicates data from the secondary RDS instance to the read-only RDS instance. This avoids interruptions to your workloads on the primary RDS instance.
  • 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 in the ApsaraDB RDS console.
  • The maximum number of read-only RDS instances allowed 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 and subscription billing methods. For more information about pricing, see Read-only 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 FAQ.

Create a read-only RDS instance

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where your RDS instance resides.
    Select a region
  3. Find your RDS instance and click its ID.
  4. In the Distributed by Instance Role section of the Basic Information page, click Create Read-only Instance.
  5. Configure the following parameters.
    Parameter Description
    Billing Method
    • Subscription: A subscription instance is an instance that you can subscribe to for a specified period and pay for up front. Subscription billing is more cost-effective than pay-as-you-go billing. Therefore, we recommend that you select subscription billing with a longer commitment. 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. We recommend that you select pay-as-you-go billing for short-term use. You can release your pay-as-you-go instance to reduce costs if it is no longer needed.
    Zone The zone where the read-only RDS instance resides. Each zone is an independent physical location within a region. Zones in the same region provide the same services. Multi-zone deployment provides zone-level disaster recovery for your business.
    Instance Type
    • Entry-level: belongs to 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 server.
    • Enterprise-level: belongs to the dedicated instance family. A dedicated instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. The top configuration of the dedicated instance family is the dedicated host instance family. A dedicated host instance exclusively occupies all the CPU, memory, storage, and I/O resources of the server where it is deployed.
    Note Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary instance types.
    Capacity The storage capacity that the 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.
    Note If you select local SSDs, the storage capacity of the RDS instance may vary based on the instance type. If you select standard or enhanced SSDs, this limit does not apply. For more information, see Primary instance types.
  6. Click Next: Instance Configuration and configure the following parameters.
    Parameter Description
    Network Type
    • Classic Network: the traditional type of network.
    • VPC: A virtual private cloud (VPC) is an isolated 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 the VSwitch of Primary Node.
    Note The RDS instance must have the same network type as the ECS instance that you want to connect. If the RDS and ECS instances both have the VPC network type, they must also reside in the same VPC. Otherwise, the RDS and ECS instances cannot communicate over an internal network.
  7. Click Next: Confirm Order.
  8. Read and select Terms of Service, click Pay Now, and then complete the payment.
    Note If your RDS instance supports the dedicated proxy feature, you can select MySQL Dedicated Proxy Service(Paid Service) in the Confirm Order step when you create the read-only RDS instance. For more information, see Dedicated proxy.

View a read-only RDS instance

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

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

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

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where your RDS instance resides.
    Select a region
  3. Find the primary RDS instance and click its ID.
  4. On 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

When a read-only RDS instance synchronizes data from the primary RDS instance, a latency may occur. You can navigate to the Basic Information page of a read-only RDS instance to view the latency of data synchronization to that instance.

FAQ

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

    You cannot select a specific zone because the zone does not have available resources. In this case, select another zone. This does not affect the read-only RDS instance.

  • When I create a read-only RDS instance, can I select a different VPC than the primary RDS instance?
    • If the primary RDS instance resides in the classic network, you can select the classic network or any VPC.
    • If the primary RDS instance resides in a VPC:
      • You can select the classic network.
      • If the local SSD storage type is used, you can select any VPC.
      • If the standard SSD storage type is used, you can select only the VPC where the primary RDS instance resides.

Related operations

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