This topic describes the notes that you must understand before you use the dedicated proxy feature of ApsaraDB RDS for MySQL.
- Proxy instances, read-only RDS instances, and primary RDS instances are separately billed.
- When you change the specifications of the primary RDS instance or a read-only instance, a transient connection may occur.
- If your application connects to your database system by using a proxy endpoint and the transaction splitting feature is not enabled, all requests that are encapsulated in transactions are routed to the primary RDS instance.
- If you create or restart a read-only instance after you enable the dedicated proxy feature, only the requests sent over new connections are routed to the new or restarted read-only instance.
- Dedicated proxy endpoints do not support compression.
- If a proxy endpoint is used to implement read/write splitting, the read consistency of the requests that are not encapsulated in transactions cannot be ensured. If you want to ensure the read consistency of these requests, you must encapsulate these requests in transactions or add hints. For more information, see Execute hints on an ApsaraDB RDS for MySQL instance.
- If your application connects to your database system by using a proxy endpoint, the
SHOW PROCESSLISTstatement returns a result set for each query. The result set consists of the query results from the primary RDS instance and read-only RDS instances.
- The connection pool feature is enabled by default. Therefore, the
SHOW PROCESSLISTstatement may return idle connections. For more information, see Set the connection pool type of an ApsaraDB RDS for MySQL instance.
- If you execute multi-statements or call stored procedures, all subsequent requests over the current connection are routed to the primary RDS instance. To use the read/write splitting feature again, you must close the current connection and establish a new connection.
- The dedicated proxy uses the 1:N connection model. After your application initiates a connection request, the dedicated proxy replicates the established connection to the primary RDS instance and all the read-only RDS instances. The maximum number of connections that are allowed to the dedicated proxy is not limited. The maximum number of connections varies based on the specifications of the primary RDS instance and read-only RDS instances. If you do not enable the transaction connection pool feature, the dedicated proxy establishes a separate connection from each client to the primary RDS instance and each of the read-only RDS instances. After you enable the dedicated proxy feature, we recommend that you specify the same maximum number of connections for the primary RDS instance and read-only RDS instances. If the maximum number is different for the primary RDS instances and read-only RDS instances, the maximum number of connections that are allowed to the dedicated proxy is subject to the smallest number of connections among these instances.
- The max_prepared_stmt_count parameter must be set to the same value for the primary RDS instance and read-only RDS instances.
- If you use the MySQL CLI to establish a connection for which hints are added, you
must add the
-cparameter to the hints. If you do not add this parameter to a hint, the MySQL CLI filters the hint out. For more information about the hint syntax, see Execute hints on an ApsaraDB RDS for MySQL instance.
- If the primary RDS instance is locked, the enabled proxy instances are not released but can process only read requests.
- If the primary RDS instance is released, the enabled proxy instances are automatically released. You are no longer charged for the dedicated proxy feature.