Starting August 1, 2024, persistent connections are supported during the failover of an ApsaraDB RDS for MySQL instance for which the database proxy version is 2.9.1. This reduces the risk of connection interruptions and improves the connection reliability.
Feature description
If your primary RDS instance fails, the system automatically promotes a secondary RDS instance as the new primary RDS instance and switches your workloads over from the original primary RDS instance to the new primary RDS instance. The primary/secondary switchover is unexpected and referred to as a failover.
A database proxy caches SQL statements that are being executed or are to be forwarded. If your RDS instance fails, the backend connections between the database proxy and databases on the RDS instance are interrupted. If a database proxy detects an instance failover, the connection between the database proxy and the required client is not immediately interrupted. The database proxy forwards failed read requests to an available RDS instance in your database system and restores the connection. For more information, see Configure persistent connection settings.
The database proxy cannot ensure that the RDS instance can successfully process failed write requests. As a result, connections are interrupted.
Effective date
August 1, 2024
Billing rules
You are not charged for persistent connections. For more information, see Billing rules for database proxies.
Prerequisites
The RDS instance runs MySQL 5.6, MySQL 5.7, or MySQL 8.0.
The RDS instance runs RDS High-availability Edition or RDS Cluster Edition.
The RDS instance uses cloud disks or local disks.
The RDS instance use dedicated database proxies.
NoteGeneral-purpose database proxies support persistent connections only during switchovers. Dedicated database proxies support persistent connections during switchovers and failovers.
The database proxy feature is enabled for the RDS instance, and the database proxy version of the RDS instance is 2.9.1. For more information, see Enable the database proxy feature.
Enable and disable persistent connections
Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which your RDS instance resides, find the RDS instance, and then click the instance ID.
In the left-side navigation pane, click Database Proxy.
In the Basic Information section, click Enabled to the right of Persistent Connections.
NoteIf you do not find Persistent Connections, your RDS instance does not meet the prerequisites.
You can click Disabled to the right of Persistent Connections to disable persistent connections.