Re: don't retry a failed server

Theo Schlossnagle <[email protected]> Fri, 14 May 2004 14:48:39 -0400
Newsgroups gmane.comp.apache.mod-backhand.general
Message-ID <[email protected]>
Alex Krohn wrote:

>Hi,
>
>I have a bit of a problem. If backhand sends a request to a server, and
>the request fails, backhand tries to resend the request, but I can't
>seem to get it to exclude the failed server. 
>
>Here's an example:
>
>[Fri May 14 22:20:47 2004] [notice] All funcs executed -> web2
>..snip
>[Fri May 14 22:20:47 2004] [error] mod_backhand: Tried... failed
>..snip
>[Fri May 14 22:20:47 2004] [notice] All funcs executed -> web2
>
>My conf looks like:
>
>        Backhand byAge
>        BackHand byBusyChildren
>        BackHand byRandom
>        BackHand byLoad
>        BackHand removeSelf
>
>(removeSelf as the main server only distributes requests to one of several mod_perl servers).
>
>I was playing with byRandom, and by putting it last, backhand will probably 
>try a different server if the first one fails, but then you lose the 
>distributing by load.
>
>Any ideas?
>  
>
The first question is this:

mod_backhand is peer-based.  The byAge rule says to not use servers that 
are not running (you haven't heard from in 5 seconds).  So, in the 
example you gave, web2 is up, running and announcing that it is okay to 
receive traffic.  So, why is web2 failing to service the request?

-- 
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth