1

I am wanting to setup master-master replication using MySQL for Failover purposes. However, I don't want data being accessed from both masters so I can mitigate the risks of master-master replication. I have a keepalived setup for web server load balancing & failover purposes already. Does it seem reasonable that I could have keepalived always pointing to Master A and only use Master B in the event Master A is down, i.e. Master B is a backup? Does anyone have ideas for a better setup?

I am not concerned with speed as much as zero downtime. Any thoughts on this would be much appreciated.

rand0mb1ts
  • 230
  • 3
  • 18
  • Kind of an old post but what you're talking about is "Active-Passive" HA as opposed to "Active-Active" where all nodes in the cluster are doing some kind of work. Active-Passive is a well accepted pattern in the industry. Only downside is the passive node isn't doing anything anymore and is usually wasted resources (on the other hand it's always read to take the load when one does go down). – Bratchley May 05 '17 at 02:56

1 Answers1

0

Your idea is fine, because then all database clients will get consistent results without risks of replication delays. When the main node would go down, all clients will again receive consistent result (in the worst case of big replication delays they will see slightly different data, but still, it will be consistent).

Sergio
  • 1,040
  • 13
  • 14