vitabaks / postgresql_cluster

Automated database platform for PostgreSQL® A modern, open-source alternative to cloud-managed databases.
https://postgresql-cluster.org
MIT License
1.83k stars 418 forks source link

Error when not running HAProxy and Keepalived on the same VM #799

Closed NormanTrinh closed 2 weeks ago

NormanTrinh commented 2 weeks ago

Here is my setup for HAProxy and Keepalived.

VM 1: HAProxy, Keepalived
VM 2: HAProxy, Keepalived
VM 3: HAProxy, Keepalived

When only VM 1 (or only 2 or only 3) enables HAProxy and Keepalived (the other VM is disabled), my client call to services works ok. When only VM 1 enabled HAProxy and only VM 2 enabled Keepalived (not run HAProxy and Keepalived as a pair on the same VM), I couldn't call my services. What happened? Is there any way to fix this?

vitabaks commented 2 weeks ago

@NormanTrinh It is not entirely clear from the description what is happening with you, could you attach configurations and logs for analysis?

NormanTrinh commented 2 weeks ago

@vitabaks I just ask because I just tested the Keepalived and HAProxy features, and the Patroni cluster still works fine. Actually, we will need to enable Keepalive in all 3 VMs for it to work properly, and HAProxy will need at least 1 alive to run.

Anyway, thank you for your great project.