Description

This rule checks that a Managed Database cluster is provisioned with at least one standby node for high availability. On DigitalOcean a standby node maintains a copy of the primary and is automatically promoted to replace it if the primary fails, so the cluster keeps serving traffic without manual intervention.

The rule inspects the cluster's node count / configuration for the presence of a standby node. A single-node cluster has no failover path; standby nodes are supported only on plans with 2 GB of RAM or more, and at least one standby is required for a high-availability configuration.

  • Single-node clusters (one node, no standby) running production workloads

  • Clusters on a plan too small (under 2 GB RAM) to support a standby node

Rationale

A single-node database has no failover path: any failure of the primary node results in a full outage until the node is manually recovered, extending downtime and risking data-in-flight.

With a standby node, DigitalOcean automatically promotes the standby when the primary fails, converting a potential prolonged outage into a brief, automatic failover and materially improving the service's availability posture.

Impact

Pros:

  • Automatic failover to the standby if the primary node fails

  • Substantially reduces downtime from a single node failure

  • Supports meeting availability commitments for production workloads

Cons:

  • Each standby node adds to the cluster cost

  • Requires a plan with at least 2 GB of RAM

  • Adding a standby triggers a brief provisioning operation on the cluster

Default Value

New clusters are provisioned as a single node with no standby by default; standby nodes are only supported on plans with 2 GB of RAM or more.

Pre-Requisite

  • DigitalOcean Control Panel access with a role that can edit the cluster configuration

  • A cluster plan of at least 2 GB RAM (resize first if smaller)

  • A brief maintenance/change window to allow provisioning

  • Optional: a DigitalOcean API token or doctl authenticated (doctl auth init)

Remediation

Test Plan

Using the DigitalOcean Control Panel:

  1. In the Control Panel, open Databases and click the cluster name.

  2. Open the Settings tab and review the Cluster configuration section (number of standby nodes), or check the node count on the Overview page.

  3. Pass: The cluster has at least one standby node configured.

  4. Fail: The cluster is a single node with no standby.

Using doctl or the API:

Read the cluster's node count.

doctl databases get <database-cluster-id> --format ID,NumNodes
curl -s -X GET "https://api.digitalocean.com/v2/databases/<database-cluster-uuid>" -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" | jq '.database.num_nodes'

Pass if num_nodes is 2 or more (primary plus at least one standby). Fail if num_nodes is 1.

Implementation Steps

Using the DigitalOcean Control Panel:

  1. On the cluster's Settings tab, open the Cluster configuration section and click Edit.

  2. Open the Standby Nodes drop-down and choose the number of standby nodes (at least one).

  3. Click Save and allow at least 5 minutes for provisioning.

  4. If the plan is under 2 GB RAM, resize the cluster to a supported plan first.

Using doctl or the API:

Add standby nodes by increasing the cluster's node count with doctl or the resize endpoint.

doctl databases resize <database-cluster-id> --num-nodes 2 --size <plan-slug>
curl -s -X PUT "https://api.digitalocean.com/v2/databases/<database-cluster-uuid>/resize" -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" -H "Content-Type: application/json" -d '{"size":"<plan-slug>","num_nodes":2}'

Backout Plan:

  1. Reduce the cluster back to a single node with doctl databases resize <database-cluster-id> --num-nodes 1 --size <plan-slug>, or PUT /resize with num_nodes 1.

  2. Removing the standby restores the original single-node topology and cost but eliminates automatic failover.

References:

  1. How to Add Standby Nodes to PostgreSQL Database Clusters

  2. doctl databases resize

  3. How to Resize PostgreSQL Database Clusters