This topic describes how to create a read-only RDS instance for a primary ApsaraDB RDS for SQL Server instance. Read-only RDS instances are used to increase the read capability of your database system and the throughput of your application. ApsaraDB RDS for SQL Server uses the Always On architecture of native SQL Server. In ApsaraDB RDS for SQL Server, physical replication is implemented to replicate a primary RDS instance and generate a read-only RDS instance. The data on the read-only RDS instance is the same as the data on the primary RDS instance. If the data on the primary RDS instance is updated, the updates are automatically synchronized to the read-only RDS instance.
For more information about read-only RDS instances, see Overview of read-only ApsaraDB RDS for SQL Server instances.
Prerequisites
A primary RDS instance that meets the following requirements is created:
The primary RDS instance runs SQL Server 2017 EE on RDS Cluster Edition, SQL Server 2019 EE on RDS Cluster Edition, or SQL Server 2022 EE on RDS Cluster Edition.
The primary RDS instance runs RDS Cluster Edition.
The primary RDS instance uses enhanced SSDs (ESSDs).
Before you create a read-only RDS instance for a primary RDS instance, you need to check the major engine version or RDS edition of the primary RDS instance on the Basic Information page of the primary RDS instance.
If the primary RDS instance runs RDS Basic Edition or RDS High-availability Edition, you can upgrade the RDS edition of the primary RDS instance to RDS Cluster Edition and then create a read-only RDS instance. For more information, see Upgrade the major engine version and RDS edition of an ApsaraDB RDS for SQL Server instance. .
Usage notes
You can create read-only RDS instances for a primary RDS instance. You cannot convert existing primary RDS instances to read-only RDS instances.
When you create a read-only RDS instance, the system replicates data from the secondary RDS instance to the read-only RDS instance. This prevents interruptions to your workloads on the primary RDS 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.
The period of time that is required to create a read-only RDS instance is positively correlated with the data volume and the I/O performance of the primary RDS instance. Before you create a read-only RDS instance, we recommend that you evaluate and optimize the data volume and I/O performance of the primary RDS instance to shorten the creation time.
The storage capacity of a read-only RDS instance cannot be less than the storage capacity of the primary RDS instance. For more information about the storage capacity range of a read-only RDS instance, see Read-only ApsaraDB RDS for SQL Server instance types.
Billing rules
You are charged for the read-only RDS instances that you create based on the subscription or pay-as-you-go billing method. For more information about the fee for a subscription read-only RDS instance, visit the ApsaraDB RDS buy page. For more information about the fee for a pay-as-you-go read-only RDS instance, see Read-only ApsaraDB RDS instance types.
Create a read-only RDS instance
- 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 ID of the instance.
In the Instance Distribution section of the page that appears, click Add to the right of Read-only Instance.
Configure basic information, including the billing method, storage type, and zone. Then, click Next: Instance Configuration.
Configure the Billing Method parameter.
Billing method
Description
Benefit
Subscription
A subscription instance is an instance for which you pay an upfront fee. If you want to use an instance for a long period of time, we recommend that you select the Subscription billing method. If you select the subscription billing method, configure the Duration parameter in the lower part of the page.
For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are offered lower prices for longer subscription periods.
Pay-as-you-go
You are charged on an hourly basis for a pay-as-you-go instance based on your actual resource usage. If you want to use an instance for a short period of time, we recommend that you select the Pay-As-You-Go billing method.
You can create a pay-as-you-go RDS instance. After you confirm that the created RDS instance meets your business requirements, you can change the billing method of the RDS instance to subscription.
You can release a pay-as-you-go RDS instance at any time. The billing of a pay-as-you-go RDS instance stops immediately after you release the instance.
Configure the Storage Type parameter.
ESSDs and general ESSDs are supported. For more information, see Storage types.
Configure the Architecture parameter. The value is fixed as X86. For more information, see Architectures.
Configure the Zone parameter.
NoteEach zone is an independent physical location within a region. No substantive differences exist between zones in the same region.
If the RDS instance resides in the same zone as the ECS instance on which your application is deployed, these instances can deliver optimal performance. If the RDS instance and the ECS instance reside in different zones in the same region, the performance of the RDS instance and the ECS instance is slightly lower than the performance of the RDS instance and the ECS instance that reside in the same zone.
Configure the Instance Type parameter.
Specify the category (dedicated or general-purpose instance family). Then, specify the CPU cores, memory capacity, and maximum number of connections.
Instance type
Description
Benefit
General-purpose instance family
A general-purpose RDS instance exclusively occupies the allocated memory and I/O resources.
A general-purpose RDS instance shares CPU and storage resources with the other general-purpose RDS instances that are deployed on the same host.
General-purpose instances are cost-effective.
Dedicated instance family
A dedicated RDS instance exclusively occupies the allocated CPU, memory, storage, and I/O resources.
NoteThe dedicated host instance family is the highest configuration of the dedicated instance family. A dedicated host RDS instance exclusively occupies all the CPU, memory, storage, and I/O resources of the host on which the RDS instance is deployed.
A dedicated instance provides better performance and stability.
NoteEach instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Instance types for read-only ApsaraDB RDS for SQL Server instances.
To ensure I/O performance for data synchronization, we recommend that you make sure that the memory capacity of the read-only RDS instance is higher than or equal to the memory capacity of the primary RDS instance.
Configure the Capacity parameter.
The storage capacity of the RDS instance. The storage capacity is used to store data files, system files, archived log files, and transaction files. The valid values of the Capacity parameter vary based on the values of the Storage Type and Instance Type parameters that you specify. You can adjust the storage capacity at a step size of 5 GB.
NoteThe storage capacity of a read-only RDS instance cannot be less than the storage capacity of the primary RDS instance.
If you select the local SSD storage type, the storage capacity of the RDS instance may vary based on the instance type. If you select the standard SSD or ESSD storage type, the storage capacity of the RDS instance does not vary based on the instance type. For more information, see Primary ApsaraDB RDS instance types.
Configure instance resources, such as the network type, vSwitch, and resource group. Then, click Next: Confirm Order.
The Network Type parameter is fixed as VPC.
Configure the VPC and VSwitch of Primary Node parameters.
We recommend that you select the VPC in which your ECS instance resides for the RDS instance. If the RDS instance and the ECS instance reside in different VPCs, these instances cannot communicate over an internal network.
NoteYou can connect the RDS instance and the ECS instance over an internal network even if the instances use different vSwitches in the same VPC.
Optional. If you set the Billing Method parameter to Pay-As-You-Go, enable Release Protection to prevent the instance from being accidentally released. For more information, see Enable or disable the release protection feature for an ApsaraDB RDS for SQL Server instance.
Configure the Resource Group parameter. You can use the default resource group or select a custom resource group based on your business requirements.
Enter a description and specify tags for the instance.
Confirm the configuration of the RDS instance in the Parameters section, configure the Purchase Plan and Duration parameters, read and select Terms of Service, and then click Pay Now to complete the payment. You must configure the Duration parameter only if you select the subscription billing method for the RDS instance.
NoteIf you select the subscription billing method for the RDS instance, we recommend that you select Auto-Renew Enabled. This way, you can prevent interruptions on your workloads even if you forget to renew the RDS instance.
It requires 1 to 10 minutes to create an RDS instance. You can refresh the page to view the RDS instance that you created.
View a read-only RDS instance
You can view a read-only RDS instance on the Instances page, the Cluster Management page of the required RDS instance, or the Basic Information page of the required RDS instance.
View a read-only RDS instance on the Instances page
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the read-only RDS instance resides.
Find the read-only RDS instance and click the ID of the instance.
View a read-only RDS instance on the Basic Information page
You can view a read-only RDS instance on the Basic Information page of the primary RDS instance.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the primary RDS instance resides.
Find the primary RDS instance and click the ID of the instance.
On the Basic Information page, move the pointer over the number of read-only RDS instances and click the ID of the read-only RDS instance that you want to view.
View a read-only RDS instance on the Cluster Management page
Prerequisites
The read/write splitting feature is enabled on the Cluster management page of the primary RDS instance to which the read-only RDS instance is attached. For more information, see Enable read/write splitting.
Procedure
Log on to the ApsaraDB RDS console.
Find the primary RDS instance and click the ID of the instance.
In the left-side navigation pane, click Cluster management.
Find the read-only RDS instance and click the ID of the instance.
Related operations
Operation | Description |
Creates a read-only instance. |