On Fri, Feb 05, 2010 at 11:43:31PM -0500, Greg Gard wrote:
> hi,
> 
> thanks for the idea and i too use a static healthcheck file, though i
> have been burned a few times when mongrel dished up the file, but
> rails was in fact hung so am going to go back to rails method as soon
> as i can get queued healthchecks. not sure which version that is.
> 
> anyway, it has been my experience if i remove all the healthcheck
> files, then haproxy skips the queue and starts returning 5xx (no
> servers available) errors right away which defeats the purpose.

Then I suspect you can do that using the tcp-inspect rules. Warning,
this is dirty. You have been warned. Basically :

frontend xxx
    tcp-request inspect-delay 1m
    tcp-request content accept if nbsrv(yyy) gt 0
    ...

backend yyy
    server zzz check


Doing that should make the request wait up to one minute if no server
appears up in backend bk_name. The request will not be automatically
unblocked one a server is there, it will only be unblocked if there
is some activity on the socket when one server is OK (very unlikely),
or after the timeout delay.

Regards,
Willy


Reply via email to