Sobes.tech
Middle — Middle+

If you had an unlimited budget, how would you implement a highly available PostgreSQL cluster without using Kubernetes?

sobes.tech AI

Answer from AI

To implement a highly available PostgreSQL cluster without Kubernetes and with an unlimited budget, you can use the following approach:

  1. Primary server — the main node that accepts writes.
  2. Replicas (Standby) — several hot replicas for read operations and quick failover.
  3. Replication — set up streaming replication with synchronous mode to minimize data loss.
  4. Automatic failover — use specialized tools like Patroni or repmgr for monitoring and automatic failover to replicas in case of failure.
  5. Shared storage is not mandatory as PostgreSQL replicates data at the WAL level.
  6. Load balancing — implement a proxy server (e.g., PgBouncer or HAProxy) to distribute requests among replicas.
  7. Monitoring and alerting — set up monitoring systems (Prometheus, Grafana) to track cluster health.
  8. Backup and recovery — regular backups using pg_basebackup and WAL archiving.

This approach ensures fault tolerance, scalability, and minimal downtime without using Kubernetes.

If you had an unlimited budget, how would you… - sobes.tech