PostgreSQL
3 minutes to deploy

PostgreSQL + Patroni

High-availability PostgreSQL clusters

Deploy production-ready PostgreSQL clusters with Patroni for automatic failover, etcd for coordination, PgBouncer for connection pooling, and optional HAProxy for read/write splitting. Includes pgBackRest for backups and support for cross-region read replicas.

High Availability with Patroni

Patroni provides automatic failover and leader election for your PostgreSQL cluster, ensuring zero-downtime operations.

  • Automatic failover: Detects primary node failures and promotes a replica within seconds
  • etcd coordination: Uses etcd for distributed consensus and leader election
  • Health monitoring: Continuous health checks and automatic recovery
  • Minimum 3 nodes: Deploy 3-7 nodes for optimal quorum and performance

PgBouncer Connection Pooling

PgBouncer manages database connections efficiently, reducing overhead and improving performance.

  • Connection pooling: Reuses connections to reduce database load
  • Transaction pooling: Efficient handling of short-lived connections
  • Per-database configuration: Fine-tune pooling settings per database

HAProxy Read/Write Splitting

Optional HAProxy instances provide intelligent routing between read and write operations.

  • Writer endpoint: Routes all writes to the current primary node
  • Reader endpoint: Distributes reads across all replicas for load balancing
  • Automatic failover: Updates routing automatically when primary changes
  • Health checks: Monitors node health and routes traffic accordingly

pgBackRest Backups

Integrated backup and restore using pgBackRest, providing fast and reliable backups.

  • Full and incremental backups: Efficient backup strategies for large databases
  • Point-in-time recovery: Restore to any point in time from backup history
  • S3-compatible storage: Store backups in S3-compatible storage
  • Parallel backup/restore: Fast backup and restore operations

Cross-Region Read Replicas

Deploy read replicas in different geographical regions for faster reads and disaster recovery.

  • Geo-distributed reads: Serve reads from the closest region for lower latency
  • Automatic replication: Streaming replication keeps replicas in sync
  • Independent scaling: Scale read capacity independently in each region
  • Disaster recovery: Replicas can be promoted to primary in case of region failure

Visual Config Editor

Customize your PostgreSQL and Patroni configuration without editing raw YAML files. Our visual config editor layers your customizations on top of battle-tested defaults.

  • Pre-configured defaults: Start with production-ready settings tuned for performance
  • Override anything: Add custom settings that merge with our defaults
  • No config conflicts: Your changes apply cleanly without breaking core functionality
  • Version controlled: Track configuration changes across deployments

FAQ

Frequently Asked Questions

Common questions about this deployment recipe.

Simple, one-time pricing

Pay once, get free updates for a year. After that, pay again to continue receiving updates.

50 spots remaining

$199$299

One-time payment • Free updates for 1 year

  • All database recipes (and upcoming recipes)
  • Unlimited servers
  • All cloud providers
  • Server hardening
  • Monitoring stack
  • AI-powered diagnostics
  • Cross-region replicas
  • Free updates for 1 year
Get sshploy now

After 1 year, pay again to continue receiving updates