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.
-
For features, limits, and use cases of read-only instances, see Introduction to SQL Server read-only instances.
-
RDS SQL Server currently supports fast initialization for read-only instances on eligible primary instances. This feature reduces read-only instance creation time to minutes and has zero impact on primary instance I/O.
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)
-
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.
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).
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.
-
In the Instance Distribution section, click Read-only Instance, then click add on the right.
-
Configure basic resources, including billing method, storage class, and zone. Click Next: Instance Configuration.
-
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.
-
Select a database Storage Type.
For supported storage classes, see Storage classes.
-
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.
-
-
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
NoteExclusive is the highest tier of Dedicated instances, occupying an entire server’s CPU, memory, storage, and I/O.
Better and more stable performance.
Note-
Each instance type has corresponding CPU cores, memory, maximum connections, and maximum IOPS.
-
To ensure sufficient I/O performance for data synchronization, make the read-only instance type (memory) at least as large as the primary instance.
-
-
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-
Read-only instance storage space must be no smaller than the primary instance.
-
For some local SSDs, storage space is tied to the instance type. ESSD and standard SSD are not subject to this restriction.
-
-
-
Configure instance resources, including network type, vSwitch, and resource group. Click Next: Confirm Order.
-
Network Type is fixed as VPC.
-
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.
NoteECS and RDS instances can connect over the internal network if they share the same VPC, even with different vSwitches.
-
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.
-
-
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
-
Log on to the RDS Management Console. In the navigation pane on the left, click Instances. Then select a region at the top.
-
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 prefixrr-, 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.
-
Log on to the RDS Management Console. In the navigation pane on the left, click Instances. Then select a region at the top.
-
Find the primary instance in the list and click its ID.
-
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
-
Log on to the RDS Management Console.
-
Find the primary instance in the list and click its ID.
-
In the navigation pane on the left, click Cluster Management.
-
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.