All Products
Search
Document Center

ApsaraDB RDS:Configure the minimum number of reserved nodes

Last Updated:Mar 28, 2026

Set a floor on how many read-only nodes the database proxy keeps available for read traffic, even when the primary node fails or replication falls behind.

How it works

In a cluster connected through a database proxy endpoint, a faulty or overloaded primary node normally blocks all read and write requests through that endpoint. The read-only nodes, however, can still serve reads independently. (In this context, nodes refer to the provisioned instances in your database system or nodes in your RDS cluster.) By setting a minimum number of reserved nodes, the database proxy keeps at least that many read-only nodes in the read traffic rotation during a failure—improving cluster availability without manual intervention.

The actual number of nodes reserved follows this formula:

min{Minimum number of reserved nodes, Number of normal read-only nodes whose read weights are not set to 0}

Note

A normal read-only node is any read-only node in the Running state, regardless of its replication status.

Use cases

Primary node failure interrupts replication

When the primary node goes down, data replication to read-only nodes is interrupted. Without reserved nodes, the database proxy endpoint stops serving reads entirely. With a minimum reserved count configured, the proxy continues routing read requests to the reserved nodes.

image

Heavy writes push replication latency above the threshold

When a large volume of writes hits the primary node, replication latency on read-only nodes can exceed the configured threshold. At that point, load balancing stops and all reads are redirected to the primary node—risking an overload or suspension. With reserved nodes configured, those nodes absorb read traffic and prevent the primary from being overwhelmed.

image

Node retention policy

When the number of eligible read-only nodes drops below the configured minimum, the database proxy selects which nodes to retain using the following two-level priority.

Priority 1: By replication status

Nodes already receiving read requests are kept. Among the remaining nodes, those with replication latency above the threshold—but with replication still running—are preferred over nodes where replication has been interrupted. If the count still falls short after retaining those nodes, interrupted-replication nodes are added until the minimum is reached.

Priority 2: By read weight

When nodes share the same replication status, those with higher read weights are retained first.

Important

After configuring the minimum number of reserved nodes, read requests may be routed to nodes whose replication latency exceeds the latency threshold. Nodes with a read weight of 0 are never included, regardless of their replication status.

Scenario reference tables

The following tables show how the retention policy applies in specific scenarios.

Nodes with different replication status

ScenarioMin reserved nodesMax latency thresholdRO1 (Replication latency)RO2 (Replication latency)RO3 (Replication latency)Readable proxyReadable node
11-1-1-1-1YesRO1
2-15060YesRO2
313004040YesRO1
4405060YesRO1
5-1-1-1YesRO1
6-15060YesRO2
7230206040YesRO1 and RO2
820-160YesRO1 and RO3
920-1-1YesRO1 and RO2
Note

-1 indicates that replication is interrupted. 0 indicates no replication latency. A value greater than 0 indicates replication is delayed but not interrupted. RO refers to a read-only node.

Nodes with the same replication status but different read weights

ScenarioMin reserved nodesRO1 (Read weight)RO2 (Read weight)RO3 (Read weight)ReadableReadable node
1020200YesRO2
11000NoNone
1202020YesRO2 and RO3
Note

0 indicates that read requests are not forwarded to the node. A value greater than 0 indicates that read requests are forwarded to the node.

Prerequisites

Before you begin, make sure that:

Configure the minimum number of reserved nodes

This feature is available in both read/write mode and read-only mode.

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your RDS instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, click Database Proxy.

  3. In the Connection Information section, find the database proxy endpoint and click Modify Configuration in the Actions column.

  4. In the dialog box, set the Minimum Instances parameter and click OK.

API reference

OperationDescription
DescribeDBProxyQueries the detailed database proxy settings of an RDS instance.
DescribeDBProxyEndpointQueries information about a database proxy endpoint.
ModifyDBProxyEndpointModifies the connection settings for a database proxy endpoint.