Galera MySQL cluster with VIPs and HAProxy for IDO-Mysql and more

This is just awesome! I was preparing something very similar in most of the parts.

Deviations would be:

  • everything is hosted at DigitalOcean and I use keepalived to trigger a failover of the floating IP
  • additional vrrp_scripts to do a mysql query (basically functional check of haproxy & a get to the icinga2 API
  • use rsync to sync /etc/icingaweb2 as there is no option for shared storage or something like that
  • haproxy is just used to balance queries to the mariadb / galera backend:
listen galera-cluster
    bind 127.0.0.1:3306
    mode tcp 
    option mysql-check user haproxy_checks
    balance roundrobin
    server do-ffm-galera01 10.10.117.123:3306 check
    server do-ffm-galera02 10.10.117.124:3306 check
    server do-ffm-galera03 10.10.117.125:3306 check

Now I’m wondering if it still makes sense to have it in my own post or if I just add it to your one. A whole bunch of content would be duplicate and having it in just one thread probably makes it easier to keep it up-to-date.

2 Likes