ApsaraDB RDS for MySQL supports dedicated proxies. This topic describes the notes that you must understand before you enable the dedicated proxy of your database system.

  • When you change the specifications of the primary or read-only RDS instances, transient connection errors may occur.
  • If your application connects to your database system by using a proxy endpoint, all the requests that are encapsulated in transactions are routed to the primary RDS instance. This applies if the transaction splitting feature is disabled.
  • 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 read consistency, 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 PROCESSLIST statement returns a result set for each query. The result set consists of the query results from the primary and read-only RDS instances.
  • If you run multi-statement queries or stored procedures, the read/write splitting feature is disabled. In this case, all the subsequent requests over the current connection are routed to the primary RDS instance. To enable the read/write splitting feature again, you must close the current connection and establish a new one. For more information about multi-statement queries, see Multi-Statement.
  • The dedicated proxy uses the 1:N connection model. After your application initiates a connection request, the dedicated proxy replicates the established connection to all the primary and read-only RDS instances. The maximum number of connections to the dedicated proxy is not limited. This number varies based on the specifications of the primary and read-only RDS instances. If you do not enable the transaction connection pool feature, the dedicated proxy establishes a connection to each of the primary and read-only RDS instances after it receives a request from your application. After you enable the dedicated proxy, we recommend that you specify the same connection specifications for the primary and read-only RDS instances. If these instances have different connection specifications, the number of allowed connections is subject to the lowest connection specifications among these instances.
  • If you create or restart a read-only RDS instance after you enable the dedicated proxy, only the requests over a new connection are routed to the new or restarted read-only RDS instance.
  • The max_prepared_stmt_count parameter must be set to the same value for the primary and read-only RDS instances
  • If you use the MySQL command-line interface (CLI) to establish a connection and execute hints, you must add the -c parameter to these 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.