Automatic management
One of the goals of the dual master replication mode is to avoid doing a manual intervention on both servers when an issue occurs. We want to reduce the switching time as far as possible in case a server fails. To do so, multiple solutions exist and we're going to see some of them here.
HAProxy
HAProxy was discussed in Chapter 4, MariaDB Replication, to load balance against multiple slaves. We're now going to see how to do so on a dual master replication. To follow the rules, we should load balance on failover, not on configuration. So why should we use a load balancer if we do not have to load balance? Because HAProxy is powerful, easy to install, easy to maintain, and does the job perfectly.
Now let's see what failover means. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access