1

Scenario

For my application, I'd like to have highly available MySQL/MariaDB setup. I find the Galera Cluster to be interesting in this case because of automatic data redundancy and immediate availability. My goals are this:

  1. Hide cluster complexity from the application (the cluster can get bigger, and change topology adding some asynchronous nodes)

  2. Handle failover outside of the application, transparently

  3. Provide load balancing for certain common case writes and reads to both synchronous instances,

  4. Still allow applications to access a certain, for e.g. async, node(s) which is optimized for, say, sequential reads for analytics. If this node fails I'd like the application to failover to a standard Galera instance, transparently to keep everything operational.

Done so far

I've read many articles about how to setup high availability and load-balanced MySQL cluster with tandem of HAProxy and Keepalived, but none of them explains why use this duo for MySQL/MariaDB/Galera scenario at all. Some examples:

When it comes to virtual IP assignment it is handled by Keepalived based on its own scriptable health checkers and VRRP.

Load-balancing is also supported by Keepalived, there are multiple algorithms implemented by which connections are LB'd to destinations: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Load_Balancer_Administration/ch-initial-setup-VSA.html

HAProxy offers some advanced features for HTTP, but this is just not my case.

The Question

What is the advantage of using HAProxy with Keepalived over just Keepalived for MySQL for the scenario presented above?

  • I don't think you can configure keepalived for three+ hosts (which galera cluster would be). On other hand, I don't see why use HA proxy if ProxySQL is available with all it's features comparing to simple TCP forwarding HAProxy offers? – akuzminsky Oct 3 '17 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.