This document describes the use limits for the TDSQL-C for MySQL database proxy.
You can set as many database proxy addresses as there are proxy nodes.
When a proxy connection address is used to implement read/write separation, the consistency of non-transactional reads is not guaranteed. If your business requires read consistency, you can encapsulate it into transactions or use the hint syntax.
When a proxy connection address is used, show processlist
will merge the results of all nodes before returning them.
For the PREPARE
statement, the database proxy will first send PREPARE
to all nodes. When a subsequent EXECUTE
request comes in, it will determine the execution route based onthe prepared statement type. For example, if a write statement is prepared, it will send the statement to the read-write instance during execution, and if a read statement outside transactions is prepared, it will send the statement to a read-only instance.
After a business connection arrives at the database proxy, the proxy will connect to the read-write instance and all configured read-only instances. The proxy itself does not have a limit on the maximum number of connections, which is mainly subject to the maximum number of connections of the backend database instance. The minimum value of this parameter of the read-write and read-only instances will affect the business performance.
After the database proxy is enabled, when a read-only instance is added or restarted, only new connection requests will be routed to it. You can view the performance metrics of each proxy node through the overview or performance monitoring. If you find that the number of connections on the nodes are unbalanced, you can distribute the connections through rebalancing. When using the proxy connection address, if you don't enable transaction split, transaction requests will be routed to the source instance.
The database proxy supports cross-AZ configuration. The number of selectable AZs depends on how many AZs are available in the current region. If only one AZ can be selected, there is only one available AZ in the region.
The database proxy feature can only be enabled when the automatic start/stop feature is disabled for the serverless service.
Was this page helpful?