0

I want to set Master - Master replication in MySQL using HAproxy as Load Balancer. Using backup option for Master 2 helps to route traffic to Master 2 only when Master 1 is down, but as soon as Master 1 comes up, traffic is automatically routed to Master 1; it does not wait for the replication to complete. Need help on the configuration.

Found a link as below but not sure on how to set the peers and will it be helpful for MySQL. Looking for a working solution.

https://www.haproxy.com/blog/emulating-activepassing-application-clustering-with-haproxy/

P Ekambaram
  • 15,499
  • 7
  • 34
  • 59

1 Answers1

0

You should consider running keepalived service on two masters. keepalived enables virtualIP that can be bound to active master. post failover of the primary master, the virtualIP gets bound to standby master and would become primary.

when old primary comes backup, it would become standby and the failback doesnt happen.

P Ekambaram
  • 15,499
  • 7
  • 34
  • 59