Standby nodes differ from read-only nodes, which provide geographically distinct horizontal read scaling.
How to Add Standby Nodes to PostgreSQL Database Clusters
Last verified 18 Nov 2026
PostgreSQL is an open source, object-relational database built for extensibility, data integrity, and speed. Its concurrency support makes it fully ACID-compliant, and it supports dynamic loading and catalog-driven operations to let users customize its data types, functions, and more.
In a database cluster, standby nodes maintain a copy of the primary node. If the primary node fails, a standby node is automatically promoted to replace it. You can optionally send read traffic to standby nodes. See Use Standby Nodes for Reads.
Clusters can have up to two standby nodes. At least one standby node is necessary for a high availability cluster configuration.
You can add standby nodes during cluster creation in the cluster configuration section of the create page.
You can also add standby nodes to an existing database cluster. From the Databases page, click the cluster to go to its Overview page, then click the Settings tab.
On the Settings page, in the Cluster configuration section, click Edit. Open the Standby Nodes drop-down and choose the number of standby nodes.
Due to the memory requirements of replication, standby nodes are only supported for plans with 2 GB of RAM or more.
When you’re done, click Save to immediately provision the standby nodes. The time to complete varies depending on the size of the primary node and its data, but we recommend allowing at least 5 minutes.
Use Standby Nodes for Reads
Standby nodes primarily provide high availability. If the primary node fails, a standby node is automatically promoted to replace it.
You can also send read traffic to standby nodes to improve cluster performance. However, doing so can overwhelm standby nodes and leave them unable to replace the primary during a failure. We recommend sending read traffic to read-only nodes instead.
Clusters with standby nodes have separate connection details for the standby nodes. To get them, go to the Databases page and select the cluster. On the cluster’s Overview page, in the Connection Details section, click the Standby nodes tab. For a description of the network, user, and TLS options, see Retrieve PostgreSQL Cluster Connection Details Using the Control Panel. The public standby hostname is the primary hostname with a replica- prefix.
You can also retrieve the standby connection details from the API, in the cluster’s standby_connection and standby_private_connection fields.
How the cluster distributes connections across standby nodes, and how connection pools reach them, depends on the cluster’s edition.
Connect to Standby Nodes on Advanced Edition Clusters
On PostgreSQL Advanced Edition clusters, each new connection to the standby hostname is load balanced across the cluster’s standby nodes.
The cluster’s primary connection details always route traffic to the primary node. Advanced Edition does not automatically send read queries from the primary connection to standby nodes, so your application chooses which connection to use for each query.
Replication to standby nodes is eventually consistent. A read from a standby node can return data that does not yet include the latest writes to the primary node. Send queries that must read their own writes, or that need the most current data, to the primary node.
To pool read connections to standby nodes, create a connection pool with Standby (read-only) as its pool target. Standby connection pools are read-only and reject writes. See Pool Target.
Connect to Standby Nodes on Standard Edition Clusters
On PostgreSQL Standard Edition clusters, the standby hostname resolves to the IP addresses of the standby nodes. To find the IP addresses, query DNS for the standby hostname. For example:
dig +short A replica-postgresql-test-do-user-4915853-0.db.ondigitalocean.comThe output lists the standby nodes’ IP addresses:
Output
203.0.113.10
203.0.113.11Traffic you send to multiple standby nodes is not load balanced. To spread traffic across standby nodes, use a client that load balances across multiple hosts, or look up the standby nodes’ IP addresses and distribute connections across them yourself.
Connection pools on Standard Edition clusters also have standby connection details. To get a pool’s standby connection details, go to the cluster’s Connection Pools tab, click Connection details for the pool, and then click the Standby nodes tab.