This topic describes how to create read-only instances for an RDS for SQL Server master instance to handle a large number of read requests and increase the application throughput. A read-only instance is a read-only replica of the master instance. Changes to the master instance are automatically synchronized to all read-only instances attached to the master instance.

For more information, see Introduction to SQL Server read-only instances.

Prerequisites

The master instance adopts the Cluster Edition and runs the SQL Server 2017 engine.

Precautions

  • You can only create read-only instances under the master instance but cannot switch an existing instance to a read-only instance.
  • Creating a read-only instance does not affect the master instance because the read-only instance copies data from the slave instance.
  • You can create up to seven read-only instances for the master instance.
  • A read-only instance is charged according to the Pay-As-You-Go billing method. That is, fees are deducted once per hour, and the deducted fees vary depending on the specifications of the read-only instance at the time of fee deduction. For more information, see the "Pricing" section in Introduction to SQL Server read-only instances.

Create a read-only instance

  1. Log on to the RDS console.
  2. In the upper-left corner, select the region where the target instance is located.
    选择地域
  3. Find the target instance and click the instance ID.
  4. Click Add Read-only Instance.

  5. On the purchase page, choose the configuration of the read-only instance, and then click Buy Now.
    Note
    • We recommend that the read-only instance and the master instance be in the same VPC.
    • To guarantee sufficient I/O for data synchronization, we recommend that the configuration of the read-only instance (the memory) is greater than or equal to that of the master instance.
    • We recommend that you purchase multiple read-only instances based on your business needs to improve availability.
  6. On the Order Confirmation page, review the order information, select the terms and agreements as prompted, click Pay Now, and complete the payment.

    The instance creation takes a few minutes.

View a read-only instance

View a read-only instance in the instance list
  1. Log on to the RDS console.
  2. Select the region where the read-only instance is located.
    选择地域
  3. In the instance list, find the read-only instance and click its ID.

    只读实例

View a read-only instance on the Basic Information page for the master instance

  1. Log on to the RDS console
  2. Select the region where the master instance is located.
    选择地域
  3. In the instance list, find the master instance and click its ID.
    主实例
  4. On the Basic Information page of the master instance, move the pointer over the number below Read-only Instance and click the ID of the read-only instance.

View a read-only instance on the Cluster management page

Prerequisites

You have enabled read/write splitting on the Cluster management page. For more information, see Enable read/write splitting.

  1. Log on to the RDS console.
  2. Select the region where the master instance is located.
    选择地域
  3. In the instance list, find the master instance and click its ID.
  4. In the left-side navigation pane, click Cluster management.
  5. Find the read-only instance and click its ID.

View the delay time of a read-only instance

When a read-only instance synchronizes data from the master instance, the read-only instance may lag behind the master instance by a small amount of time. You can view the delay on the Basic Information page of the read-only instance.



APIs

API Description
CreateReadOnlyDBInstance Used to create an RDS read-only instance.