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. ...

Get MariaDB High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.