PostgreSQL Read Replicas

Offload expensive read operations to a separate instance of your database.

A read replica is a separate instance of your PostgreSQL database that only allows read access. As you write data to your primary instance, Render asynchronously replicates those changes to your read replica:

Render
Read/Write
Read only
Your other
services
Primary
instance
Read
replica

A read replica can reduce load on your primary instance and make one-off queries safer. They’re great for analysis tools that don’t need to write data, or for running computationally expensive queries without affecting the performance of your primary instance.

A read replica always has the same instance type and storage as your primary instance and is billed accordingly.

Requirements

For your database to support a read replica, it must:

  • Have at least 10 GB of storage
  • Use the Basic-1gb instance type or higher

If your database uses a legacy instance type, it must use the Standard instance type or higher.

Setup

Go to your database’s Info page in the Render Dashboard and click Add Read Replica:

Database Info Page

A confirmation dialog appears. If you confirm, Render spins up the replica instance and starts copying over data from the primary instance. That’s it! Your read replica should become available within a few minutes. If it takes longer, please contact support@render.com.

After your read replica becomes available, you can connect to it just like you do your primary instance, using its internal or external connection URL.

Performance

Changes to your primary instance are synced to your read replica after a short delay. This means the replica is best suited to use cases that don’t require instant access to the most recent data possible.

The length of this delay depends on your primary instance’s load. You can monitor this from the primary instance’s Metrics page, under Replication Lag.

Read replicas vs. high availability

A read replica database instance is different from a standby instance that’s used for high availability. Read replicas help decrease load on your primary instance, and they’re safer for one-off and expensive queries. In contrast, a standby instance helps reduce downtime in the event of instance failure.