Galera + HAProxy + health check

1,064 views
Skip to first unread message

Martin

unread,
Aug 15, 2014, 7:58:15 PM8/15/14
to codersh...@googlegroups.com
Can someone provide example configuration for haproxy with health check? I use MariaDB Galera Cluster with 4 nodes and found many tutorials about health check. But all is only about checking port 3306 and I think this is not right way. What about scenario when mysql is running, port 3306 responding but node is not synced? I hope, there is some way when HAProxy can check wsrep status variables and sent sql traffic to node only if node is synced.

Ho Tri Bao

unread,
Aug 15, 2014, 9:54:23 PM8/15/14
to codersh...@googlegroups.com
You can try this https://github.com/olafz/percona-clustercheck

We successfully use that one.

Cheers,
Bao.



On 08/16/2014 06:58 AM, Martin wrote:
Can someone provide example configuration for haproxy with health check? I use MariaDB Galera Cluster with 4 nodes and found many tutorials about health check. But all is only about checking port 3306 and I think this is not right way. What about scenario when mysql is running, port 3306 responding but node is not synced? I hope, there is some way when HAProxy can check wsrep status variables and sent sql traffic to node only if node is synced.
--
You received this message because you are subscribed to the Google Groups "codership" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codership-tea...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Apoorva Gaurav

unread,
Aug 15, 2014, 9:56:44 PM8/15/14
to Ho Tri Bao, codersh...@googlegroups.com
Use option httpchk in haproxy, on db servers run a webserver like nginx or xineted which is taking request over http and runnning a simple check at db something like this https://groups.google.com/group/codership-team/browse_thread/thread/44ee59c8b9c458aa/98b47d41125cfae6
--
Thanks & Regards,
Apoorva

Martin

unread,
Aug 20, 2014, 2:18:38 PM8/20/14
to codersh...@googlegroups.com
Perfect, I try this soon. Thanks for tip.

Dne sobota, 16. srpna 2014 3:54:23 UTC+2 Tri.Bao Ho napsal(a):

Martin

unread,
Aug 21, 2014, 12:30:33 PM8/21/14
to codersh...@googlegroups.com
I try percona clustercheck now and works perfect. Can recommend to everyone :-)

Dne středa, 20. srpna 2014 20:18:38 UTC+2 Martin napsal(a):
Reply all
Reply to author
Forward
0 new messages