All Products
Search
Document Center

ApsaraDB RDS:Enable read/write splitting (read-only endpoint)

Last Updated:Mar 30, 2026

The read-only routing endpoint routes all read requests to your read-only RDS instances, offloading read traffic from the primary instance and scaling read throughput proportionally as you add more instances — without any changes to your application connection strings.

How it works

In RDS Cluster Edition for ApsaraDB RDS for SQL Server, the cluster runs one primary instance and one secondary instance. Read-only instances must be created separately.

After you enable the read-only routing endpoint, configure both endpoints in your application:

Endpoint Purpose
Primary RDS instance endpoint Handles all write requests
Read-only routing endpoint Receives all read requests and distributes them to read-only instances based on their read weights
image

Health checks

Read/write splitting continuously monitors the health of each read-only instance. If an instance fails or its data replication latency exceeds the configured threshold, the system stops routing read requests to that instance and redirects them to healthy instances. Traffic resumes to a recovered instance automatically.

To avoid a single point of failure (SPOF), create at least two read-only instances.

Limitations

  • The read-only routing endpoint is fixed. Enabling or disabling it multiple times does not change the endpoint address, and you cannot modify it manually. Your application configuration never needs to be updated.

  • The read-only routing endpoint is free. You still pay for the read-only instances you create.

  • The read-only routing endpoint is not supported on the classic network.

Prerequisites

Before you begin, ensure that you have:

Enable read/write splitting

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

  2. In the left-side navigation pane, click Cluster Management, then click Enable now..

  3. In the dialog box, configure the parameters described in the following table, then click OK.

image
Parameter Description
Network type Internal (VPC): connects to instances in the same virtual private cloud (VPC), such as an Elastic Compute Service (ECS) instance, over the internal network. We recommend this option for most production workloads — internal connections are stable.<br><br>Internet Address: connects to your RDS instance from a different VPC or an on-premises device over the Internet. To use this option, apply for a public endpoint first. See Apply for or release a public endpoint.
Read weight distribution Controls how read requests are distributed across the primary instance, secondary instance, and read-only instances. A higher weight means more requests. For example, weights of 100, 200, and 200 distribute requests at a 1:2:2 ratio.<br><br>Automatic Distribution: the system assigns weights based on instance specifications. Weights for new read-only instances are assigned automatically.<br><br>Customized Distribution: specify a weight (0–10000) for each instance manually. New read-only instances default to a weight of 0. If a read-only instance is released, its weight is removed automatically.

View cluster information

View basic cluster information

On the Cluster Management page, the Basic Information section shows the read-only routing endpoint, port number, network type, read weight distribution, and the number of instances in the cluster.

image

View the cluster configuration list

The Instances section lists all instances in the cluster with their status, role, and read weight.

image

What's next