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 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 another 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 or Enterprise Edition
  • MySQL 5.7 on RDS High-availability or 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, click here to submit a ticket.

Precautions

  • You can create read-only RDS instances for the primary RDS instance. You cannot convert existing 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.
  • A read-only RDS instance is independent of the primary RDS instance. The lifecycle of a read-only RDS instance is not affected when the primary RDS instance expires or is 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 by using the ApsaraDB RDS console.
  • The maximum number of read-only RDS instances that are 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 the prices of read-only RDS instances, 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 the "FAQ" section of this topic.

Create a read-only RDS instance

  1. Go to the Basic Information page.
    1. Log on to the ApsaraDB for RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where your RDS instance resides.
      选择地域
    2. Find your RDS instance and click its 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 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
    • 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 server.
    • 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 server where it is deployed.
    Note Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum input/output operations per second (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 the local SSD storage type, the storage capacity of the RDS instance may vary based on the instance type. If you select the standard or enhanced SSD storage type, this limit does not apply. For more information, see Primary instance types.
    • If you select the standard or enhanced SSD storage type, the Automatic Storage Expansion option is selected by default. This allows ApsaraDB RDS to automatically scale the storage capacity when the storage capacity cannot meet your business requirements. In this case, the RDS instance will not be locked due to an abnormally small storage capacity.
  4. Click Next: Instance Configuration and configure the following parameter.
    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 better performance than the classic network. If you select the VPC network type, you must also specify the VPC parameter and the vSwitch of Primary Node parameter.
    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, these instances must also reside in the same VPC. Otherwise, these instances cannot communicate over an internal network.
  5. Click Next: Confirm Order.
  6. Read and select Terms of Service, click Pay Now, and then complete the payment.
    Note If your RDS instance supports the dedicated proxy service, you can select MySQL Dedicated Proxy Service (Paid Service) in the Confirm Order step for the read-only RDS instance. For more information, see What are dedicated 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 its ID.

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 its ID.
  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

When a read-only RDS instance synchronizes data from the primary RDS instance, a little latency may occur. 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. 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 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 or enhanced SSDs 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.