thanks willy,

probably not going to do the dirty thing. will come up with something
else as i have things working
pretty nicely now with very few errors. don't want to introduce
wierdness. most of my problems with
my setup have nothing to do with haproxy, instead they relate to the
fact that rails is pretty brittle
requiring only a single threaded app server that has to have a
constant connection to the db. i have
tried several different ways to decouple things, but under load it
gets flaky. anyway, thanks for the prompt reply.

...gg

On Sat, Feb 6, 2010 at 2:08 AM, Willy Tarreau <[email protected]> wrote:
> 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
>
>



-- 
greg gard, psyd
www.carepaths.com

Reply via email to