<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Have you looked at the
proxy_next_upstream configuration?<br>
<br>
<a class="moz-txt-link-freetext" href="http://wiki.nginx.org/NginxHttpProxyModule#proxy_next_upstream">http://wiki.nginx.org/NginxHttpProxyModule#proxy_next_upstream</a><br>
<br>
It should do what you want.<br>
<br>
Also, depending on yourapplication and traffic, it might also be
worth looking into lowering fail_timeout.<br>
<br>
<div class="moz-signature">Sajan Parikh<br>
<i>Owner, Noppix LLC</i><br>
<br>
e: <a class="moz-txt-link-abbreviated" href="mailto:sajan@noppix.com">sajan@noppix.com</a><br>
p: (563) 726-0371<br>
<br>
<img alt="Noppix LLC Logo"
src="cid:part1.08050304.03000401@noppix.com"></div>
On 07/02/2013 11:55 PM, Sandeep L wrote:<br>
</div>
<blockquote cite="mid:BLU171-W29A983AB470F7274796904AC730@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">
<div class="post-text" itemprop="description"> Hi,<br>
<br>
<br>
I am trying to configure nginx with upstream.<br>
<br>
<br>
We have 3 machines where we run application server and proxy
passing all requests from nginx to application serves.<br>
I used following configuration in nginx:<br>
<br>
<br>
<b>upstream appcluster {</b><br>
<b> server host1.example.com:8080 max_fails=2
fail_timeout=300s;</b><br>
<b> server host2.example.com:8080 max_fails=2
fail_timeout=300s;</b><br>
<b>}</b><br>
<br>
<br>
Now issue is if the request comes to nginx when one server is
down due to unknown reasons its waiting for a long time
getting response or some times its getting connection timeout.<br>
<br>
<br>
Is there any module in nginx to get upstream servers status
and forward requests only working upstream server.<br>
<br>
<br>
Can someone suggest me right configuration to get response
from appcluster without latency or connection time out
whenever a server wont respond.<br>
<span style="font-size: 12pt;"><br>
</span><br>
<span style="font-size: 12pt;">Thanks,</span><br>
</div>
<div>Sandeep.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
</blockquote>
<br>
</body>
</html>