Replies: 5 comments 24 replies
-
Hello @z7x The vip-manager is designed to run the VIP on the server where the leader (Primary) Postgres role is, so it is expected that it will be one subnet. In your case, there may be PostgreSQL High-Availability with HAProxy Load Balancing scheme using HAProxy and keepalived (to provide an VIP address). In our configuration keepalived checks the status of the HAProxy service and in case of a failure delegates the VIP to another balancer server. That is, VIP is no longer tied to the leader role. I've already had a similar discussion on the Slack channel (available to project sponsors), I'll duplicate it for you:
I think this is possible if you set |
Beta Was this translation helpful? Give feedback.
-
Would you mind elaborating on this? How do I deploy individual inventory to each site separately, ensuring the replication is running between all servers, whilst keeping only one leader server and two HAproxy/load balancers? Many thanks |
Beta Was this translation helpful? Give feedback.
-
Thank you so much. This worked, and all seems to be working as expected. 😎 (I think)Can I check with you to see if I enabled SSL correctly? I went to pgbouncer.ini on each server to manually specify the parameters as below.
I obtained this wildcard SSL from my IONOS account and I placed it in pgbouncer directory. I wonder if there are any parameters I need to specify, either in certbot or pgbouncer. I'm looking into this. |
Beta Was this translation helpful? Give feedback.
-
Hi @vitabaks I noticed a problem with my setup. I took Site B down (both VMs) to test, and I could no longer connect via Site A VIP until at least one of the VMs at Site B was running and vice versa. I can't connect at all if one of the sites is completely down. Any ideas what could have gone wrong? Could Apache2 interfere with any of these components? My colleague installed it a few days ago on all 4 servers to build custom PHP API access. Although, now thinking about it, I don't think I actually tested taking one site down when I thought it was all working. These are the recent logs
|
Beta Was this translation helpful? Give feedback.
-
This was my idea of my configuration. The subdomain can be controlled/updated by our custom API cloud workflow and A records updated/added/removed etc. |
Beta Was this translation helpful? Give feedback.
-
So, I managed to set up three Ubuntu VMs thanks to @vitabaks (thank you) with the following IPs:
Site 1
10.2.7.44
10.2.7.45
Site 2
192.168.16.46
The VIP is 10.2.7.48, but if Site 1 goes down (i.e. due to a power outage), I'd like to have a second VIP, say 192.168.16.48, to be waiting for connections.
Is this possible?
Can I simply edit vip-manager.yml and change the IP to 192.168.16.48 on Site 2? It seems to be switching over correctly, but do I use DNS round-robin to work with this?
Beta Was this translation helpful? Give feedback.
All reactions