3 ms·
Very cool. How does failover work? I see that Spilo expects a standard load balancer in front of the cluster, but that load balancer won’t be able to track who
by ko_pivot 2y ago
Very cool. How does failover work? I see that Spilo expects a standard load balancer in front of the cluster, but that load balancer won’t be able to track who the writer instance is on its own.
- bambambazooka 2y agoYou can put HAProxy in front with a write- and a read-frontend with a backend each and all servers in the backend. To determine which server is a write instance or a standby you can provide a `external-check command` to the backends. That command can be a bash script, that connects to the server and executes `SELECT pg_is_in_recovery();`.