You can create one or more read-only MyBase for MySQL instances to offload read requests from your primary MyBase for MySQL instance in an ApsaraDB for MyBase dedicated cluster. This improves the read performance of the database and increases the throughput of your application.
For more information about ApsaraDB for MyBase, see What is ApsaraDB for MyBase?.
- If you update the kernel version of a primary instance, the kernel versions of all the read-only instances associated with the primary instance are updated. For more information, see Update the minor engine version of an ApsaraDB RDS for MySQL instance.
- If you modify the configuration of a primary instance, all the read-only instances associated with the primary instance are automatically restarted.
- You can associate up to five read-only instances with a primary instance. If you need to create more read-only instances, submit a ticket.
- The storage capacity of each read-only instance must be greater than or equal to that of the primary instance. Before you increase the storage capacity of the primary instance to scale up your database system, increase the storage capacity of the read-only instances.
- When a primary instance is released upon expiration, all the read-only instances associated with the primary instance are released.
- Log on to the ApsaraDB for MyBase console.
- In the top navigation bar, select the deployment region.
- In the left-side navigation pane, click Clusters. On the page that appears, find the dedicated cluster that you want to manage and click Details in the Actions column.
- Find the primary instance for which you want to create a read-only instance, and choose Actions column. in the
- In the panel that appears, configure the following parameters.
Parameter Description Instance Type Select an instance type for the read-only instance. Storage Capacity The storage capacity of the read-only instance. You can specify a storage capacity for the read-only instance based on the remaining storage capacity of your database.Note You must set the Storage Capacity parameter to a value that is greater than or equal to the storage capacity of the primary instance. Deployment Method You can select Default Policy or Specified Host as the deployment method. VSwitch Specify the vSwitch to which the read-only instance is connected. You can log on to the Virtual Private Cloud (VPC) console to view the detailed information about the vSwitch.
- Click OK. Note If you set Storage Type to Enhanced SSD (Recommended), complete the payment on the page that appears.
After a read-only instance is created, you can modify the code of your application and change the endpoint for read requests to the endpoint of the read-only instance. You can also enable the read/write splitting feature provided by ApsaraDB RDS. This way, write requests are automatically directed to the primary instance and read requests are automatically distributed to read-only instances based on the read weights of these instances. For more information, see Enable the proxy terminal feature for an ApsaraDB RDS for MySQL instance.