I have successfully set up a
postgres master-replica with
repmgr for automatic failover which can be found over here https://github.com/mgonzaga1990/pg-rpi-failover
Now what I'm planning to do next is to set up
HAProxy However, I can't find resources that could teach me how to properly set up load balancing together with
My Scenario is
master failed. One of the replicas/slave/standby servers will become the master.
Now if that happened should I always change the configuration of
HAProxy do we have a way to make it automatic as well?? where
HAProxy could detect who the next master is?? Then route every request to do
WRITE operations on that newly elected
Moreover, the old master; once comes back up will not be the master but becomes slave/replica or standby.
Thanks for the response.