All Products
Search
Document Center

ApsaraDB RDS:Create a SQL Server read-only instance

Last Updated:Jun 20, 2026

When your database experiences significantly increased read load, create one or more read-only instances to scale read capacity and improve overall application throughput. RDS SQL Server uses native AlwaysOn technology and physical replication to create read-only instances from the primary instance. Data on read-only instances remains consistent with the primary instance, and all data updates on the primary instance automatically sync to every read-only instance.

Note

Prerequisites

You must create a SQL Server read-only instance under a primary instance that meets all the following conditions:

  • Instance version: SQL Server 2017 Enterprise Cluster Edition, 2019 Enterprise Cluster Edition, or 2022 Enterprise Cluster Edition

  • Instance edition: Cluster Edition

  • Storage class: enterprise SSD (ESSD) or Premium ESSD

  • Billing method: subscription or pay-as-you-go (does not support Serverless instances)

Note
  • Before creating a SQL Server read-only instance, confirm the primary instance version and edition on the Basic Information page. If you do not have a primary instance yet, create a primary instance that meets the above requirements first.

  • If your primary instance uses Basic Edition or High-availability Edition and you need to create a read-only instance, upgrade the existing instance to Enterprise Cluster Edition before creating a read-only instance.

Important notes

  • You can only create read-only instances under a primary instance. You cannot convert an existing primary instance into a read-only instance.

  • Creating a read-only instance copies data from the secondary instance, so it does not affect the primary instance.

  • Number of read-only RDS instances: You can create up to seven read-only RDS instances for a primary RDS instance.

  • Instance backup: You cannot configure backup policies or manually create backups for read-only RDS instances. These are configured and created on the primary RDS instance. You cannot create temporary RDS instances from backup files or any point in time. You cannot overwrite RDS instances by using backup sets. After a read-only RDS instance is created, you cannot use backup sets to overwrite the primary RDS instance to restore data.

  • Data migration: You cannot migrate data to read-only RDS instances.

  • Database management: You cannot create or delete databases on read-only RDS instances.

  • Account management: You cannot create or delete accounts, grant permissions to accounts, or change the passwords of accounts on read-only RDS instances.

  • Instance creation time: Read-only instance creation time increases with the primary instance’s data volume and I/O performance. Before creating a read-only instance, evaluate and optimize the primary instance’s data volume and I/O performance to reduce creation time.

  • Storage space: The storage space of a read-only instance must be no smaller than that of the primary instance.

Billing rules

You are charged for the read-only RDS instances that you create based on the subscription billing method or the pay-as-you-go billing method. For more information, see Read-only instance types.

Note

If the billing method of the primary RDS instance is serverless, you cannot create read-only RDS instances.

Create a read-only instance

Create a read-only instance using the RDS console or the API (CreateReadOnlyDBInstance).

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the Instance Distribution section, click Read-only Instance, then click add on the right.

  3. Configure basic resources, including billing method, storage class, and zone. Click Next: Instance Configuration.

    1. Select a Billing Method.

      Billing method

      Recommendation

      Advantage

      Subscription

      For long-term RDS usage, select Subscription (one-time payment). Then select a Duration in the bottom-left corner.

      Subscription costs less than pay-as-you-go, and longer durations offer greater discounts.

      Pay-As-You-Go

      For short-term RDS usage, select Pay-As-You-Go (hourly billing).

      You can create a Pay-As-You-Go instance first, then switch to subscription after confirming it meets your needs.

      You can release the instance anytime to stop billing.

    2. Select a database Storage Type.

      For supported storage classes, see Storage classes.

    3. Select a Zone for the instance.

      Note
      • A zone is an independent physical area within a region. Zones in the same region have no practical differences.

      • ECS instances achieve slightly better performance accessing RDS instances in the same zone versus other zones in the same region, though the difference is small.

    4. Select an Instance Type.

      Choose a category (Dedicated or General-purpose) and a specific specification (CPU cores, memory, maximum connections, etc.).

      Category

      Description

      Features

      General-purpose

      Dedicated: memory and I/O

      Shared: CPU and storage

      Low cost with high value.

      Dedicated

      Dedicated: CPU, memory, storage, and I/O

      Note

      Exclusive is the highest tier of Dedicated instances, occupying an entire server’s CPU, memory, storage, and I/O.

      Better and more stable performance.

      Note
    5. Select Capacity.

      Storage space includes data, system files, log files, and transaction files. The available range (minimum and maximum) depends on your selected instance type and storage class. Adjust storage space in increments of at least 5 GB.

      Note
  4. Configure instance resources, including network type, vSwitch, and resource group. Click Next: Confirm Order.

    1. Network Type is fixed as VPC.

    2. Select a VPC and VSwitch of Primary Node.

      We recommend using the same VPC as your ECS instance. ECS and RDS instances in different VPCs cannot connect over the internal network.

      Note

      ECS and RDS instances can connect over the internal network if they share the same VPC, even with different vSwitches.

    3. Set additional custom parameters. Keep default values unless you have specific requirements.

      Parameter

      Description

      Release Protection

      When Billing Method is Pay-As-You-Go, you can enable instance release protection to prevent accidental release.

      Resource Group

      Select the default or a custom resource group for easier instance management.

      Instance Name

      Customize the name. Use 2–255 characters. Start with a letter or Chinese character. You can include numbers, underscores (_), or hyphens (-).

      Character Set Collation Rule

      Defaults to the primary instance’s system collation.

  5. Confirm Parameter Configuration, Quantity, and Duration (subscription instances only). Click Pay Now and complete payment.

    Note
    • For subscription instances, we recommend selecting Auto-renewal to avoid service interruption from missed renewals.

    • Instance creation takes 1–10 minutes. Refresh the page to check status.

View read-only instances

You can view read-only instance details on the Instances page, the Cluster Management page of the target instance, or the Basic Information page of the target instance.

View on the Instances page

  1. Log on to the RDS Management Console. In the navigation pane on the left, click Instances. Then select a region at the top.

  2. Find the read-only instance in the list and click its ID. On the Instances page, you can identify primary instances (ID prefix rm-, purple "P" badge, Instance Type = Regular Instance) and read-only instances (ID prefix rr-, red "R" badge, Instance Type = Read-only Instance).

View on the Basic Information page

You can view read-only instances on the primary instance’s Basic Information page.

  1. Log on to the RDS Management Console. In the navigation pane on the left, click Instances. Then select a region at the top.

  2. Find the primary instance in the list and click its ID.

  3. On the primary instance’s Basic Information page, hover over the read-only instance count and click the read-only instance ID.

View on the Cluster Management page

Prerequisite

You must have enabled read/write splitting on the Cluster Management page. If you see "Read/write splitting connection not enabled," click Enable Now to activate it.

Procedure

  1. Log on to the RDS Management Console.

  2. Find the primary instance in the list and click its ID.

  3. In the navigation pane on the left, click Cluster Management.

  4. Find the read-only instance and click its ID. On the Cluster Management page, the Basic Information section at the top shows the read-only address, address type (internal network/VPC), weight allocation mode (system-assigned), primary instance ID, network port (e.g., 1433), VPC, and number of participating instances. Buttons for Set Read-only Address and Disable Read-only Address appear at the top. The Instance List section below displays each read-only instance’s ID, status, read weight, configuration (type and storage space), and region/zone in a table.

Next steps

After creating a read-only instance, enable read/write splitting and configure read weights. The system will route read requests based on your configured weight ratios.

FAQ

Can I change the billing method of a read-only instance?

Do changing a read-only instance’s configuration, releasing it, or switching its billing method affect the primary instance?

No.

Can accounts created on the primary instance be used on read-only instances?

Accounts created on the primary instance sync to read-only instances. You cannot manage accounts on read-only instances. Accounts on read-only instances can only perform read operations, not write operations.

If the primary instance fails, can I promote a read-only instance to a regular instance?

No.

Do read-only instances support manual or automatic backups?

Because backups run on the primary instance, read-only instances do not support backup settings or manual backups.

Do read-only instances support parallel replication?

Yes. RDS SQL Server uses parallel replication by default.

How does transaction log cleanup work?

RDS SQL Server transaction logs use a two-phase process:

  • Log truncation: Each log backup usually triggers automatic truncation. Truncation may fail during long-running transactions, sync waits, or kernel-related issues.

  • Log shrink: Daily routine backups include log shrinking. You can also shrink logs manually via the console.

How does read-only instance replication work? What causes replication delay between primary and read-only instances, how can I fix it, and how do I check for it?

Read-only instances copy data from the secondary instance. Data stays consistent with the primary instance, and all primary instance updates automatically sync to every read-only instance.

Common causes of replication delay include the following:

  • Cause: Primary instance is large, but read-only instance is too small, causing excessive primary-secondary lag.

    Solution: Upgrade the read-only instance type.

  • Cause: Concurrent large transactions cause delay.

    Solution: Investigate and resolve large transactions. Common causes include locking issues, slow SQL statements, or uncommitted ad-hoc queries.

  • Cause: Replication anomalies from kernel bugs.

    Solution: Upgrade the instance major version or minor engine version.

You can view diagnostics through the SQL Server autonomy service or by running the following SQL:

SELECT
    ag.name AS [availability_group_name]
    , d.name AS [database_name]
    , ar.replica_server_name AS [replica_instance_name]
    , drs.truncation_lsn
    , drs.log_send_queue_size
    , drs.redo_queue_size
FROM
    sys.availability_groups ag
    INNER JOIN sys.availability_replicas ar
        ON ar.group_id = ag.group_id
    INNER JOIN sys.dm_hadr_database_replica_states drs
        ON drs.replica_id = ar.replica_id
    INNER JOIN sys.databases d
        ON d.database_id = drs.database_id
WHERE drs.is_local=0
ORDER BY
    ag.name ASC, d.name ASC, drs.truncation_lsn ASC, ar.replica_server_name ASC

Why don’t I see a read-only node option when creating an RDS SQL Server Enterprise Cluster Edition instance?

Read-only instances must be added separately under a primary instance. First, create a primary instance that meets these conditions, then follow the procedure in this topic to add read-only instances under it.

  • Primary instance version: SQL Server 2017 Enterprise Cluster Edition, 2019 Enterprise Cluster Edition, or 2022 Enterprise Cluster Edition

  • Primary instance edition: Cluster Edition

  • Primary instance storage classes: enterprise SSD, Premium ESSD

  • Primary instance billing method: subscription or pay-as-you-go (does not support Serverless instances)