All Products
Search
Document Center

ApsaraDB RDS:Use read/write splitting to increase the processing capability of an ApsaraDB RDS instance

Last Updated:Mar 30, 2026

Read/write splitting lets you offload read traffic from your primary RDS instance to one or more read-only instances, increasing overall database throughput without changing your application code. This feature is available for MySQL and SQL Server.

When read/write splitting is enabled, ApsaraDB RDS generates a read/write splitting endpoint or a read-only routing endpoint. This endpoint automatically routes write requests to the primary instance and distributes read requests across your read-only instances.

image

Use cases

  • Read-heavy workloads: When read traffic saturates the primary instance, add read-only instances behind a read/write splitting endpoint to scale out without resizing the primary.

  • Reporting and analytics: Run long-running queries on a read-only instance so they don't compete with transactional writes on the primary.

How it works

  1. Create one or more read-only instances manually. The primary instance replicates data to each read-only instance.

  2. Enable read/write splitting. ApsaraDB RDS generates a shared endpoint for your application to connect to.

  3. Point your application to the read/write splitting endpoint or read-only routing endpoint. No other application changes are needed.

All write requests are forwarded to the primary instance. Read requests are distributed among the available read-only instances.

Limitations

Replication lag: Read-only instances receive data from the primary with some replication lag. If your application requires reading the latest committed data immediately after a write — for example, in a read-your-own-writes scenario — connect directly to the primary instance instead of the shared endpoint.

Manual instance creation: Read-only instances are not created automatically. You must manually create read-only RDS instances.

Minimum read-only instance requirement: The shared endpoint requires at least one active read-only instance to distribute read traffic.

What's next

Use the following guides to set up read/write splitting for your database engine: