All Products
Search
Document Center

ApsaraDB RDS:Configure the connection settings for a database proxy endpoint

Last Updated:Mar 28, 2026

Configure connection settings for a database proxy endpoint to control how read and write traffic is routed across your primary and read-only instances. Each endpoint can be tuned independently for scenarios such as read/write splitting and high-concurrency read workloads.

Prerequisites

Before you begin, ensure that you have:

Configure connection settings

  1. Go to the Instances page. In the top navigation bar, select the region where your RDS instance resides, then click the instance ID.

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

  3. In the Connection Information section, find the endpoint you want to modify in the Proxy Endpoint (Terminal) ID column, then click Modify Configuration in the Actions column.

  4. In the dialog box that appears, update the connection settings as needed.

    ParameterDescription
    Connection DescriptionA custom description for the endpoint. Maximum 30 characters.
    Read/Write AttributesControls which instance types this endpoint can reach. See Choose read/write attributes for guidance.
    Latency ThresholdThe maximum latency (in seconds) allowed for data replication from the primary RDS instance to its read-only RDS instances before the proxy stops forwarding reads to a read-only instance. Valid values: 0–3600. Set to 30 or higher. Only available when Read/Write Attributes is set to Read/Write (Read/Write Splitting).
    Transaction SplittingFixed as Enabled. Forwards read requests that occur before write operations in a transaction to read-only instances, reducing load on the primary instance. Cannot be disabled.
    Read Weight AllocationDetermines how read traffic is distributed. See Configure read weight allocation for details.
  5. Click OK.

Choose read/write attributes

Use this table to select the right mode for your workload:

ScenarioRecommended optionReason
General application traffic, OLTP, ETL jobsRead/Write (Read/Write Splitting)The endpoint connects to the primary instance and all read-only instances, and accepts both read and write requests. This is the default value.
Reporting queries, analytics, read-intensive workloadsRead-only (Primary Instance Not Connected to Receive Write Requests)The endpoint connects only to read-only instances and rejects write requests, isolating analytics load from your primary instance.
Changes to Read/Write Attributes apply only to new connections. Existing connections are not affected.

Configure read weight allocation

Automatic — The proxy assigns read weights based on instance specifications. New read-only instances are added to the read/write splitting link automatically with no manual configuration required. For default weight values, see Default read weights.

Custom — Specify a read weight for each read-only instance. Valid values: 0–10000. New read-only instances default to a weight of 0 and must be updated manually.

A higher weight means more read requests are sent to that instance. For example, if the primary instance has a read weight of 0 and three read-only instances have weights of 100, 200, and 200, the primary instance handles only write requests and read requests are distributed at a ratio of 1:2:2.

To force a specific request to a particular instance type regardless of the configured weights, add a SQL hint:

  • Route to the primary instance: /*FORCE_MASTER*/ SELECT * FROM table_name;

  • Route to a read-only instance: /*FORCE_SLAVE*/ SELECT * FROM table_name;

When changes take effect

ParameterNew connectionsExisting connections
Read/Write AttributesTakes effect immediatelyNot affected; existing connections retain the previous setting
Read Weight AllocationTakes effect immediately; no transient connection dropsContinue using previous weights until reconnected
After read-only RDS instances are released, the read weights automatically become invalid.
If your RDS instance fails or the data replication latency exceeds the specified threshold, the read weights automatically become invalid. After your RDS instance runs as expected, the read weights become valid again.

What's next

API reference

OperationDescription
DescribeDBProxyQueries the details of a database proxy.
DescribeDBProxyEndpointQueries the endpoint of a database proxy.
ModifyDBProxyEndpointModifies the connection settings for a database proxy endpoint.

References