This topic provides an overview of read-only ApsaraDB RDS for PostgreSQL instances. If your database system receives a large number of read requests but a small number of write requests, a single primary RDS instance may not be capable of processing the read requests at high speeds. This may even interrupt your workloads. In this case, you can create one or more read-only RDS instances to offload read requests from the primary RDS instance. This increases the read capability of your database system and the throughput of your application.

Introduction

When a read-only RDS instance is being created, ApsaraDB RDS replicates data from the secondary RDS instance to the read-only RDS instance. The read-only RDS instance has the same data as the primary RDS instance. After an update to the data on the primary RDS instance is complete, ApsaraDB RDS immediately synchronizes the update to all the read-only RDS instances.

Note
  • If the primary RDS instance uses local SSDs, you can create a maximum of five read-only RDS instances. If the primary RDS instance uses standard or enhanced SSDs, you can create a maximum of 32 read-only RDS instances.
  • If the primary RDS instance uses local SSDs, its read-only RDS instances run based on the high-availability architecture.
  • If the primary RDS instance uses standard or enhanced SSDs, its read-only RDS instances run based on the single-node architecture. In this architecture, a read-only RDS instance does not have a secondary RDS instance as a standby. For availability purposes, we recommend that you purchase more than one read-only RDS instance. This allows you to implement failovers among the created read-only RDS instances by using libpq or Java Database Connectivity (JDBC). For more information, see Configure automatic failover and read/write splitting.
The following figure shows the topology of the read-only RDS instances that are attached to a primary RDS instance.PostgreSQL topology

Billing

Read-only RDS instances are charged based on the pay-as-you-go billing method. For more information, see Read-only instance types.

Features

  • Region and zone: A read-only RDS instance must reside in the same region as the primary RDS instance. However, the primary and read-only RDS instances can reside in different zones.
  • Specifications and storage capacity: If the primary RDS instance uses local SSDs, the specifications and storage capacity of a read-only RDS instance must be greater than or equal to those of the primary RDS instance.
  • Network type: A read-only RDS instance can have a different network type than the primary RDS instance. For more information, see Change the network type of an ApsaraDB RDS for PostgreSQL instance.
  • Accounts and databases: The accounts and databases on a read-only RDS instance are synchronized from the primary RDS instance. Therefore, you do not need to manage the accounts or databases on a read-only RDS instance.
  • IP address whitelists: When a read-only RDS instance is being created, ApsaraDB RDS replicates the IP address whitelists of the primary RDS instance to the read-only RDS instance. However, the IP address whitelists on the read-only RDS instance are independent of those that are configured on the primary RDS instance. For more information about how to modify the IP address whitelists of a read-only RDS instance, see Configure a whitelist for an ApsaraDB RDS for PostgreSQL instance.
  • Monitoring and alerting: You can monitor the performance metrics of a read-only RDS instance. These metrics include the disk usage, input/output operations per second (IOPS), number of connections, and CPU utilization.

Precautions

  • If the primary RDS instance uses local SSDs, you can create a maximum of five read-only RDS instances. If the primary RDS instance uses standard or enhanced SSDs, you can create a maximum of 32 read-only RDS instances.
  • Backups are created on the primary RDS instance. Read-only RDS instances do not support backup settings or manual backups.
  • You cannot migrate data to read-only RDS instances.
  • You cannot create or delete databases on read-only RDS instances.
  • You cannot create or delete accounts, grant permissions to accounts, or change the passwords of accounts on read-only RDS instances.
  • If the memory capacity that you specify for the primary RDS instance during a specification change is greater than the memory capacity of a read-only RDS instance, the read-only RDS instance restarts.
  • If a read-only RDS instance encounters minor engine replication errors or other unexpected errors, ApsaraDB RDS rebuilds the read-only RDS instance.

FAQ

After I create accounts on my primary RDS instance, can I manage the accounts on the read-only RDS instances?

No, although the accounts that are created on your primary RDS instance are synchronized to the read-only RDS instances, you cannot manage the accounts on the read-only RDS instances. The accounts have only the read permissions on the read-only RDS instances.