This topic provides an overview of read-only ApsaraDB RDS for PostgreSQL instances. If your database system receives a large number of read requests and a small number of write requests, a single primary RDS instance may fail to process 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.

Background information

When a read-only RDS instance is being created, ApsaraDB RDS replicates data from the secondary RDS instance to the read-only RDS instance. After the read-only RDS instance is created, it has the same data as the primary RDS instance. In addition, after the data on the primary RDS instance is updated, ApsaraDB RDS immediately synchronizes the updates to all read-only RDS instances that are attached to the primary RDS instance.

Note
  • If the primary RDS instance is equipped with local SSDs, you can create up to 5 read-only RDS instances. If the primary RDS instance is equipped with standard SSDs or enhanced SSDs (ESSDs), you can create up to 32 read-only RDS instances.
  • If the primary RDS instance is equipped with local SSDs, its read-only RDS instances run in a high-availability architecture.
  • If the primary RDS instance is equipped with standard SSDs or ESSDs, its read-only RDS instances run in a 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 perform 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 primary RDS instance and its read-only RDS instances. PostgreSQL topology

Billing

Read-only RDS instances support the subscription billing method and the pay-as-you-go billing method. For more information about the fee for a subscription read-only RDS instance, go to 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.

Highlights

  • Region and zone: The primary RDS instance and its read-only RDS instances can reside in the same zone or in different zones of the same region.
  • Specifications and storage capacity: If the primary RDS instance is equipped with local SSDs, the specifications and storage capacity of a read-only RDS instance must be higher than or equal to the specifications and storage of the primary RDS instance.
  • Network type: The network type of a read-only RDS instance can be different from the network type of the primary RDS instance. For more information, see Change the network type of an ApsaraDB RDS for PostgreSQL instance.
  • Account and database management: The accounts and databases on a read-only RDS instance are synchronized from the primary RDS instance. You cannot manage the accounts or databases on a read-only RDS instance.
  • IP address whitelist management: 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 the IP address whitelists on the primary RDS instance. For more information about how to modify the IP address whitelists of a read-only RDS instance, see Configure an IP address 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, IOPS, number of connections, and CPU utilization. The monitoring data of these metrics are provided in charts.

Precautions

  • If the primary RDS instance is equipped with local SSDs, you can create up to 5 read-only RDS instances. If the primary RDS instance is equipped with standard SSDs or ESSDs, you can create up to 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 unexpected errors such as failures to replicate database engine settings, 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, the accounts that are created on your primary RDS instance are synchronized to its 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.