Good day.

I'm following this article to configure HAProxy to balance with roundrobin between 3 MySQL servers (db1, db2, db3) in a MariaDB Galera cluster (working perfectly).

However I have a problem. In the tutorial there's a "Testing Load Balancing and Failover" area, in which I must execute the command mysql -h -u haproxy_root -p -e "show variables like 'server_id'" to see the same result along with the server name. Executing the same command more than once will show the roundrobin jumping between db1 and db2 and viceversa... it never pass to db3. I'm reading everywhere and roundrobin should jump between all the servers, but in my case it just work between db1 and db2, why not in db3?

Check my HAProxy configuration:

    log local0 notice
    user haproxy
    group haproxy

    log global
    retries 2
    timeout connect 3000
    timeout server 5000
    timeout client 5000

listen mysql-cluster
    mode tcp
    option mysql-check user haproxy_check
    balance roundrobin
    server db1 check
    server db2 check
    server db3 check

    mode http
    stats enable
    stats uri /
    stats realm Strictly\ Private
    stats auth monitor_user:password

Those 3 servers are properly declared in my MariaDB Galera Cluster configuration file, and they share behave perfectly in between. Check part of it here:


What am I missing? Please help me.

Thanks in advance.

  • How are you confirming that there is no connection request to db3 ? – x1b2j Jun 23 '15 at 23:02
  • Check the haproxy's status page, perhaps its health check is failing for db3 – sendmoreinfo Jul 8 '15 at 21:25

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.