This topic describes how to create one or more read-only ApsaraDB RDS for MySQL instances to offload read requests from your primary instance in an ApsaraDB for MyBase dedicated cluster. Read-only instances also increase the throughput of your application.
For more information about ApsaraDB for MyBase, see What is ApsaraDB for MyBase?.
- After you update the kernel version of a primary instance, the kernel versions of all the read-only instances attached to the primary instance are updated. For more information, see Upgrade the minor engine version of an ApsaraDB RDS for MySQL instance.
- After you modify the configurations of a primary instance, all the read-only instances attached to the primary instance restart.
- You can attach up to five read-only instances to a primary instance. If you want to attach more read-only instances, submit a ticket.
- The storage capacity of a read-only instance must be greater than or equal to that of the primary instance. Before you increase the storage capacity of a primary instance, increase the storage capacity of the read-only instances attached to the primary instance.
- After a primary instance is expired and released, all the read-only instances attached to the primary instance are released.
- Log on to the ApsaraDB for MyBase console.
- In the upper-left corner of the page, select the region where you want to create the
- In the left-side navigation pane, choose .
- Find the primary instance for which you want to create a read-only instance, and choose
Actions column. in the
- Configure the following parameters.
Parameter Description VSwitch The VSwitch to which the read-only instance is connected. You can log on to the VPC console to view information about the VSwitch. Instance Type: The type of the read-only instance. Storage Capacity The storage capacity of the read-only instance.Note The storage capacity of the read-only instance must be greater than or equal to that of the primary instance.
- Click OK.Note If you set the storage type to Enhanced SSD when you create the instance, you must complete the payment on the page that appears. If you set the storage type to Local SSD when you create the instance, you do not need to pay extra fees. You have paid for the storage space of local SSDs when you purchased the host where the read-only instance resides.
After a read-only instance is created, you can access your application and change the destination endpoint of read requests to the new endpoint of the read-only instance. You can also use the read/write splitting function provided with ApsaraDB for MyBase to distribute write requests to the primary instance. This function can also be used to distribute read requests to the read-only instances based on the read weights of these instances. For more information, see Read/write splitting.