Implementing HA on MySQL

In this implementation, we will need three separate MySQL nodes and two HAProxy servers so that we guarantee our load balancer can fail over in case one of them fails. Keepalived will be installed in each HAProxy to control the Virtual IP. Different nodes in this setup will be assigned as the following:

  • Virtual IP: 192.168.47.47
  • HAProxy01: 192.168.47.120
  • HAProxy02: 192.168.47.121
  • MySQL01: 192.168.47.125
  • MySQL02: 192.168.47.126
  • MySQL03: 192.168.47.127

In order to implement HA on MySQL, go through the following steps:

  1. Let's start first by installing and configuring our HAProxy servers:
packtpub@haproxy1$ yum updatepacktpub@haproxy1$ yum install haproxy keepalived
  1. We check whether the HAProxy is properly installed: ...

Get Mastering OpenStack - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.