This topic provides an overview of read-only ApsaraDB RDS for PostgreSQL instances. If your application sends a large number of read requests to your database system, the primary RDS instance may be overwhelmed. 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 scales the read capability of your database system and increases the throughput of your application.

Introduction

While a read-only RDS instance is being created, your database system replicates data from a secondary RDS instance to the read-only RDS instance. The primary and secondary RDS instances have the same data. After an update to the data on the primary RDS instance is complete, your database system immediately synchronizes the update to all of the read-only RDS instances.

Note
  • 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 run in the high-availability architecture.
  • If the primary RDS instance uses standard or enhanced SSDs, its read-only RDS instances run in the single-node architecture. In this architecture, a read-only RDS instance does not have a secondary RDS instance as its backup. For availability purposes, we recommend that purchase more than one read-only RDS instance. This way, you can implement failovers by using the libpq or Java Database Connectivity (JDBC) API. For more information, see Configure automatic failover and read/write splitting.
The following figure shows the topology of read-only RDS instances that are attached to a primary RDS instance.PostgreSQL topology

Billing

You are charged an hourly fee for each read-only RDS instance based on the pay-as-you-go billing method.

Features

  • Billing method: Read-only RDS instances use the pay-as-you-go billing method. This makes them cost-effective.
  • 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: The specifications and storage capacity of a read-only RDS instance must be greater than or equal to those of the primary RDS instance uses local SSDs.
  • Network type: The network type of a read-only RDS instance can be different from that of 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 accounts or databases on a read-only RDS instance.
  • IP address whitelists and security groups: While a read-only RDS instance is being created, your database system replicates the IP address whitelists and security groups of the primary RDS instance to the read-only RDS instance. However, the IP address whitelists and security groups on the read-only RDS instance are independent of those configured on the primary RDS instance. For more information about how to modify the IP address whitelists and security groups 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), maximum number of connections, and CPU utilization.

Precautions

  • 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.
  • Backups are created for the primary RDS instance. Therefore, 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, authorize 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 specifications change is greater than the memory capacity of a read-only RDS instance, your database system restarts the read-only RDS instance.
  • If a read-only RDS instance encounters a database engine replication error or any other unexpected error, your database system re-creates the read-only RDS instance.

FAQ

Can I manage the accounts created on the primary RDS instance from its read-only RDS instances?

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