Skip to content
Install

Configure high availability

A database with one instance has no failover: if its node fails, the database is down until the instance comes back. Standby instances keep a copy of the primary, so one of them can take over when the primary fails. To configure high availability, add a standby, then choose a replication mode that sets how much data a failover can lose.

  • Edit access to the project: the Admin or Member project role.
  • A dedicated database.
  • Available quota for each new instance.
  1. Open the database.
  2. Go to Settings > Resources.
  3. In Instances, increase the number of instances.
  4. Select Scale to <number>.

The Instances list shows each instance as Primary or Standby, with its status. A new standby copies the primary before it serves traffic.

The replication mode controls when Postgres treats a write as saved.

ModeBehaviorNeeds a standby
AsyncA failover can lose the last moments of writes.No
PreferredEach commit waits for a standby while one is healthy.Yes
RequiredNo acknowledged write is lost, but writes stop if no standby is reachable.Yes
  1. Open the database.
  2. Go to Settings > High availability.
  3. Select a mode. Orchard saves the mode immediately.
  1. Open the database.
  2. Go to Settings > Resources.
  3. In Instances, decrease the number of instances.
  4. Select Scale to <number>.
  5. In the confirmation dialog, select Scale to <number>.

The primary keeps running.

Standbys also serve read-only traffic. To send reads to them, refer to Read replicas.