This topic describes how to create a read-only RDS instance for your primary ApsaraDB RDS for PostgreSQL instance. This allows your database system to process more read requests. This also increases the throughput of your application. Each read-only RDS instance is a replica of the primary RDS instance. Data updates on the primary RDS instance are automatically synchronized to all of its read-only RDS instances.

For more information about read-only RDS instances, see Overview of read-only ApsaraDB RDS for PostgreSQL instances.

Prerequisites

  • The primary RDS instance runs PostgreSQL 10, 11, or 12.
  • If the primary RDS instance uses local SSDs, it must be a dedicated RDS instance that provides 8 or more CPU cores and 32 GB of memory. If the primary RDS instance uses standard or enhanced SSDs, no specific requirements are imposed for specifications.
Note If the primary RDS instance runs PostgreSQL 10 with standard or enhanced SSDs, you cannot create read-only RDS instances.

Precautions

  • You can create read-only RDS instances for the primary RDS instance. However, you cannot convert existing RDS instances to read-only RDS instances.
  • When you create a read-only RDS instance, your database system replicates data to the read-only instance from a secondary RDS instance. This avoids interruptions to the workloads on the primary RDS instance.
  • A read-only RDS instance does not inherit the parameter settings of the primary RDS instance. Your database system generates default parameter settings for the read-only RDS instance. You can modify these default parameter settings in the ApsaraDB for RDS console.
  • The specifications and storage capacity of a read-only RDS instance cannot be lower than those of the primary RDS instance uses local SSDs.
  • If the primary RDS instance uses local SSDs, up to five read-only RDS instances are allowed. If the primary RDS instance uses standard or enhanced SSDs, up to 32 read-only RDS instances are allowed.
  • If the primary RDS instance uses local SSDs, its read-only RDS instances use the high-availability architecture. If the primary RDS instance uses standard or enhanced SSDs, its read-only RDS instances use the single-node architecture.
  • Read-only RDS instances are charged at an hourly fee based on the pay-as-you-go billing method.

Create a read-only RDS instance

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target primary RDS instance resides.Select a region
  3. Find the target primary RDS instance and click its ID.
  4. In the Distributed by Instance Role section of the Basic Information page, click Create Read-only Instance.Create Read-only Instance
  5. Configure the following parameters.
    Parameter Description
    Zone The zone where the read-only RDS instance resides. Each zone is an independent physical location within a region. Zones in the same region provide the same services. Multi-zone deployment provides zone-level disaster recovery for your business.
    Instance Type
    • Entry-level: belongs to the general-purpose instance family. A general-purpose instance exclusively occupies the allocated memory and I/O resources. However, it shares CPU and storage resources with other general-purpose instances that are deployed on the same server.
    • Enterprise-level: belongs to the dedicated instance family. A dedicated instance exclusively occupies the allocated CPU, memory, storage, and I/O resources. The top configuration of the dedicated instance family is the dedicated host instance family. A dedicated host instance exclusively occupies all the CPU, memory, storage, and I/O resources of the server where it is deployed.
    Note Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary instance types.
    Capacity The storage capacity that is used to store data files, system files, binlog files, and transaction files. The storage capacity increases in increments of 5 GB.
    Note The dedicated instance family supports exclusive allocations of resources. Therefore, the storage capacity of each instance type with local SSDs in this family is fixed. For more information, see Primary instance types.
  6. Click Next: Instance Configuration and configure the following parameters.
    Parameter Description
    Network Type
    • Classic Network: a traditional type of network.
    • VPC: A virtual private cloud (VPC) is an isolated network that provides higher security and better performance than the classic network. If you select the VPC network type, you must also specify the VPC and VSwitch of Primary Node parameters.
    Note The RDS instance must have the same network type as the ECS instance that you want to connect. If the RDS and ECS instances both have the VPC network type, they must also reside in the same VPC. Otherwise, the RDS and ECS instances cannot communicate over an internal network.
  7. Click Next: Confirm Order.
  8. Read and select Terms of Service and click Pay Now.

A few minutes are required to create the read-only RDS instance.

View a read-only RDS instance

To view a read-only RDS instance on the Instances page, perform the following steps:
  1. Log on to the ApsaraDB for RDS console.
  2. Select the region where the target read-only RDS instance resides.Select a region
  3. Find the target read-only RDS instance and click its ID.Find the target read-only RDS instance

To view a read-only RDS instance on the Basic Information page of its primary RDS instance, perform the following steps:

  1. Log on to the ApsaraDB for RDS console.
  2. Select the region where the target primary RDS instance resides.Select a region
  3. Find the target primary RDS instance and click its ID.
  4. On the Basic Information page, move the pointer over the number of read-only RDS instances and click the ID of the read-only instance that you want to view.Go to the read-only RDS instance from its primary RDS instance

View the latency of data replication to a read-only RDS instance

When a read-only RDS instance synchronizes data from its primary RDS instance, a specific latency may occur. You can view the latency on the Basic Information page of the read-only RDS instance.

Latency of data replication to a read-only RDS instance

Related operations

Operation Description
Create read-only instance Creates a read-only ApsaraDB for RDS instance.