This topic introduces the transaction splitting function provided by ApsaraDB RDS for MySQL in its dedicated proxy feature. This function reduces the loads on the primary instance by identifying and distributing the read requests initiated prior to write requests within a transaction to read-only instances.
In the default transaction isolation level READ COMMITTED, after ApsaraDB RDS MySQL turns off automatic transaction commit (set autocommit = 0), Read requests initiated before the transaction is started are distributed to read-only instances by using the SLB module.
- Explicit transactions (for example, begin or start transcation) do not support transaction splitting.
- If you enable transaction splitting, global consistency cannot be ensured for some services. We recommend that you evaluate whether transaction splitting is suitable for your business before you enable it.
- Log on to the ApsaraDB for RDS console.
- In the upper-left corner of the page, select the region where the target RDS instance
- Find the target RDS instance and click its ID.
- In the left-side navigation pane, click Database Proxy.
- In the Proxy Endpoint section of the Proxy Service tab, click Enable to the right of Transaction Splitting.
- When you no longer need transaction splitting, you can click Disable to the right of Transaction Splitting to disable it.
- After you enable or disable transaction splitting, the setting only works for new connections.