PostgreSQL Patroni HA Cluster Blueprint
For high-consequence workloads requiring zero data loss and automated sub-5-second failover on bare-metal or private cloud infrastructure, Patroni is the industry standard.
---
⚙️ Config File Snippet (/etc/patroni/patroni.yml)
scope: pg-cluster-prod
namespace: /service
name: pg-node-1
etcd3:
hosts:
- 10.0.1.10:2379
- 10.0.1.11:2379
- 10.0.1.12:2379
restapi:
listen: 10.0.1.10:8008
connect_address: 10.0.1.10:8008
bootstrap:
dcs:
ttl: 30
loop_wait: 10
retry_timeout: 10
maximum_lag_on_failover: 1048576
postgresql:
use_pg_rewind: true
use_slots: true
parameters:
max_connections: 500
shared_buffers: 16GB
work_mem: 64MB
wal_level: replica
max_wal_senders: 10