Hi all,
In a previous thread Willy Tarreau had said:
>Until an SQL check is implemented, I would suggest that you connect to an
alternate port managed by inetd starting a trivial script on the servers.
The script would be responsible for trying to connect to the >database using
something representative (login, password, doing a request maybe), and
return "HTTP/1.0 200" if it's OK, and "HTTP/1.0 500" (or nothing) if it
fails. You could even think about putting the valid >response in a table and
requesting that table to ensure that everything works as expected.
>To achieve this, you have to use the "port XXX" parameter after the "check"
keyword on the server line, and enable HTTP health checks. In fact, many
people exploit the ability to HTTP check another port >because it helps them
perform the most advanced check techniques on their servers.
Could anyone give me an example of what this might look like? I have
written a pearl script that will connect to mysql and check a specified
table for data, but I am curious about the correct syntax to hook it all up
to haproxy.
Thanks in advance,
-- Nathan BiondiReceived on 2008/03/29 23:24
This archive was generated by hypermail 2.2.0 : 2008/03/29 23:30 CET