In most cases, if data replication on a read-only node in a cluster fails because the primary node is faulty or overloaded, the cluster that is connected by using the database proxy endpoint can no longer process read or write requests. However, the read-only nodes in the cluster can still process read requests. In this topic, nodes are referred to as the provisioned instances in your database system or nodes in your RDS cluster. You can configure the minimum number of reserved nodes in the database proxy. If the primary node is faulty or overloaded, a specific number of nodes are reserved to process read requests. This improves the availability of your cluster.
Feature description
You can configure the minimum number of reserved nodes to retain a specific number of read-only nodes to process read requests in the event of an exception. For example, the primary node is faulty or data replication on a read-only node is interrupted. After you configure the minimum number of reserved nodes, a specific number of read-only nodes are reserved to process read requests. You can use the following formula to calculate the minimum number of the reserved read-only nodes: min{Minimum number of reserved nodes, Number of normal read-only nodes whose read weights are not set to 0}
.
Note
Normal read-only nodes refer to read-only nodes that are in the Running state. No limits are imposed on the replication status of the normal read-only nodes.
Scenarios
You can configure the minimum number of reserved nodes in the following scenarios:
Data replication on a read-only node is interrupted because the primary node is faulty.
In this case, you can configure the minimum number of reserved nodes to allow the database proxy endpoint to process read requests.

If a large amount of data is written to the primary node, the replication latency of the read-only nodes exceeds the latency threshold and load balancing cannot be implemented.
If the replication latency of the read-only nodes exceeds the latency threshold because a large amount of data is written to the primary node, all read requests are forwarded to the primary node. As a result, the primary node may be overloaded or suspended. If you configure the minimum number of reserved nodes, the reserved read-only nodes offload read requests from the primary node. This prevents the primary node from being suspended due to heavy CPU loads.

Node retention policy
If the number of read-only nodes to which read requests can be forwarded is fewer than the minimum number of reserved nodes that you specify, the system retains read-only nodes based on the following policies:
The read-only nodes to which read requests have been forwarded are still retained. In addition, the read-only nodes on which the replication latency is greater than the latency threshold and data replication is not interrupted are preferentially retained. If the number of these types of read-only nodes is still fewer than the minimum number of reserved nodes that you specify, the read-only nodes on which data replication is interrupted are retained to ensure that the number of reserved read-only nodes is the same as the minimum number of reserved nodes that you specify.
If the nodes meet the preceding priority requirements and have the same replication status, read-only nodes are retained by read weight. Read-only nodes with high read weights are preferentially retained.
Important
After you configure the minimum number of reserved nodes, read requests can be forwarded to the nodes whose replication latency exceeds the latency threshold. Read requests are not forwarded to the nodes whose read weight is set to 0.
The following table helps you understand the node retention policy.
Usage notes
After you configure the minimum number of reserved nodes, traffic may be routed to the read-only nodes whose replication latency exceeds the latency threshold.
You can configure the minimum number of reserved nodes in read/write mode and read-only mode.
Procedure
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. Then, find the RDS instance and click the instance ID.
In the left-side navigation pane, click Database Proxy.
In the Connection Information section, find the database proxy endpoint that you want to modify and click Modify Configuration in the Actions column.
In the dialog box that appears, configure the Minimum Instances parameter and click OK.