Hold requests long enough for me to restart upstream?

Cliff Wells cliff at develix.com
Sat Mar 21 03:33:20 MSK 2009


On Fri, 2009-03-20 at 17:24 -0700, mike wrote:
> On Fri, Mar 20, 2009 at 3:32 PM, Cliff Wells <cliff at develix.com> wrote:
> 
> > This won't work.  The problem is that his backend isn't unresponsive,
> > it's *down*.   That is, the backend socket isn't even open.   Timeouts
> > are for sockets that are "open but unresponsive", not sockets that are
> > "closed".
> >
> > In this case Nginx would try each backend and *instantly* go to the next
> > one until it ran out of backends and then it would throw a 50x error.
> 
> Idea: perhaps a directive to tell it how long to wait before skipping
> to the next one for actual connection refused errors? (I would imagine
> that would be what fail_timeout is... I figured -any- failure is
> considered)

It's actually "how long until Nginx decides the backend failed".  In the
case of a closed socket, there's no decision to be made: it's known
instantly to be failed.

The fundamental problem here is that the OP is trying to "fake" HA.   If
he wants HA, he needs to have more than one backend to failover to.   

Regards,
Cliff







More information about the nginx mailing list