Two copies of the console on two servers. One is primary and serves everyone; the other is standby with a live copy of the database. If the primary goes down, the standby is promoted and the load balancer sends people and agents to it, in about a minute, with nothing to do by hand.
How it works
- Postgres runs under Patroni on each node, which keeps exactly one primary. The leader lock lives in etcd on both nodes and on a small witness in a third place, so when the nodes lose sight of each other only the side the witness can see stays primary. Both nodes never take writes at once.
- Commits wait for the standby, so a failover loses no committed data. If the standby is down, the primary carries on alone.
- On the standby, the console shows a "standby node" page, its scheduler only mirrors files from the primary, and its gateway turns agents away. When the standby is promoted, all of that flips within seconds.
- A Cloudflare load balancer checks
/healthz/primaryon both nodes and sends traffic to the one that answers. - Agents can be given both gateways' addresses, so they find the primary even without the load balancer.
What you need
| Two nodes | The same size (2 vCPU, 4 GB RAM and up), with Docker and the same release |
| Witness | Any small Linux box in a third place (1 vCPU, 512 MB), with Docker |
| Private link | The three machines reach each other on private addresses: WireGuard, Tailscale or a private LAN |
| Cloudflare | Load Balancing on the console's zone |
Keep the nodes in the same city or region: every commit waits for the standby, so distance adds to each one. Setting it up means about five minutes of downtime while the first node moves onto Patroni. The steps are in deploy/ha/README.md in the release.
Day to day
Settings › High availability shows both nodes, how far behind the standby is, the gateways, and Make primary for a planned switchover (patching a node, say). Back up from whichever node is primary, and upgrade the primary first (it runs the migrations), then the standby. Server logs and certificates stay on each node; everything else is in the shared database.