After a read-only instance is created, you can purchase the database proxy, configure the connection address policy, and set the database proxy address in an application. In this way, the system automatically forwards write requests to the primary instance and read requests to read-only instances. This document describes how to enable read/write separation via the console.
Prerequisite
The instance is the read-write instance.
Directions
1. Log in to the TDSQL-C for MySQL console, select the cluster with the proxy enabled in the cluster list, and click the cluster ID to enter the cluster management page. 2. Open the topology in Cluster Management > Cluster Details, hover over the database proxy area, and click Details to go to the database proxy management page. Alternatively, click the Database Proxy tab on the cluster management page to go to the database proxy management page.
3. Click Overview, find the target access address on the connection address page, and click Adjust Configurations in the operation column.
4. Select the read-write attribute for the access address on the configuration adjustment page, complete other settings as needed, assign a read weight, and click OK.
Note:
The weight here is for read requests (non-transactional).