tag:blogger.com,1999:blog-9238405.post6665058909126855027..comments2024-03-18T02:04:50.380-07:00Comments on Agile Testing: Use HAProxy 1.4 if you need MySQL health checksGrig Gheorghiuhttp://www.blogger.com/profile/17863511617654196370noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-9238405.post-75323676063370774242010-04-02T06:13:57.186-07:002010-04-02T06:13:57.186-07:00azalio -- it turns out MySQL health checks are sti...azalio -- it turns out MySQL health checks are still not working right in 1.4. I ended up applying this solution:<br /><br />http://sysbible.org/x/2008/12/04/having-haproxy-check-mysql-status-through-a-xinetd-script/<br /><br />GrigGrig Gheorghiuhttps://www.blogger.com/profile/17863511617654196370noreply@blogger.comtag:blogger.com,1999:blog-9238405.post-11455849668573424612010-04-02T04:30:21.408-07:002010-04-02T04:30:21.408-07:00HA-Proxy version 1.4.3 2010/03/30.
listen mysql1 ...HA-Proxy version 1.4.3 2010/03/30.<br /><br />listen mysql1 127.0.0.1:3340<br /> mode tcp<br /> option mysql-check<br /> balance roundrobin<br /> server mysql1 mysql_host:3306 check port 3306<br /><br />[WARNING] 091/134441 (5601) : Server mysql1/mysql1 is DOWN, reason: Layer7 wrong status, code: 0, info: "Host 'client_host' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", check duration: 0ms.<br />[ALERT] 091/134441 (5601) : proxy 'mysql1' has no server available!azaliohttps://www.blogger.com/profile/01049564495784993938noreply@blogger.comtag:blogger.com,1999:blog-9238405.post-37458380970658245552010-02-27T15:05:33.759-08:002010-02-27T15:05:33.759-08:00You know that... and I know that... but there are ...You know that... and I know that... but there are too many people that still equate <i>availability</i> with a healthy system. Doing my part to debunk the myth. ;-)Jason Dixonhttps://www.blogger.com/profile/16513642860886662202noreply@blogger.comtag:blogger.com,1999:blog-9238405.post-48884480740302139082010-02-27T14:38:07.909-08:002010-02-27T14:38:07.909-08:00Hey Jason -- thanks for the feedback. I am not rel...Hey Jason -- thanks for the feedback. I am not relying on HAProxy to do any kind of deep MySQL monitoring, I have many nagios and munin checks for that purpose. I use HAProxy as a load balancer in front of multiple MySQL instances, and I merely want HAProxy to flag a backend instance as 'down' when it doesn't respond anymore on a particular port number. That's what I mean by 'health check' in this particular scenario.Grig Gheorghiuhttps://www.blogger.com/profile/17863511617654196370noreply@blogger.comtag:blogger.com,1999:blog-9238405.post-83878180429919508222010-02-27T14:30:37.526-08:002010-02-27T14:30:37.526-08:00Using HAProxy is not a measure of MySQL health. Q...Using HAProxy is not a measure of MySQL health. Querying MySQL is a measure of MySQL health. Extract useful metrics and correlate them with related activity and latency to determine the true "health" of your storage engine.Jason Dixonhttps://www.blogger.com/profile/16513642860886662202noreply@blogger.com