Updated on 2023-09-26 GMT+08:00

Modifying Read/Write Splitting Parameters

Scenarios

After read/write splitting is enabled, you can modify proxy parameters, for example, multiStatementType.

Constraints

To modify read/write splitting parameters, you need to contact customer service to apply for required permissions.

To change the value of multiStatementType, the proxy version must be 2.22.11.000 or later.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the DB instance name.
  5. In the navigation pane on the left, choose Database Proxy.
  6. On the displayed page, click Modify Parameters in the proxy information area.
  7. Change the value of multiStatementType and click OK.

    multiStatementType is not available for read-only proxies.

    • Strict (default): After a multi-statement request is sent to the primary instance, the read/write splitting of the current connection becomes unavailable and all subsequent requests are routed to the primary instance.
    • Loose: After a multi-statement request is sent to the primary instance, the read/write splitting of the current connection still works.
    • Parse: After a multi-statement request is sent to the primary instance, the request is parsed to determine whether to split subsequent read and write requests.