<div dir="ltr">Hello,<div><br></div><div>I have an upstream block with two servers as follows:</div><div><br></div><div>upstream {</div><div>  server <a href="http://foo.com">foo.com</a>;</div><div>  server <a href="http://bar.com">bar.com</a> max_fails=0 backup;</div><div>}</div><div><br></div><div>My desired use case would be that the <a href="http://foo.com">foo.com</a> server is hit for all requests and can be marked as down by nginx if it starts serving errors. In this case nginx will fallback to hitting <a href="http://bar.com">bar.com</a>, however <a href="http://bar.com">bar.com</a> should not be allowed to be marked down by nginx.</div><div><br></div><div>What is actually happening is the "max_fails=0" statement is essentially being ignored causing the error message "<span style="color:rgb(38,50,56);font-family:roboto,arial,sans-serif;font-size:13px">no live upstreams while connecting to upstream" in my logs.</span></div><div><font color="#263238" face="roboto, arial, sans-serif"><br></font></div><div><font color="#263238" face="roboto, arial, sans-serif">Is there a configuration here that obtains my desired use case?</font></div><div><font color="#263238" face="roboto, arial, sans-serif"><br></font></div><div><font color="#263238" face="roboto, arial, sans-serif">Thank you,</font></div><div><font color="#263238" face="roboto, arial, sans-serif">~Jonathan<br clear="all"></font><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div></div></div><div><table cellpadding="0" cellspacing="0" style="border:1px dotted rgb(211,211,211);text-align:center"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-color:rgb(51,105,232) rgb(211,211,211) rgb(211,211,211);border-width:2px 1px 1px;border-style:solid dotted dotted">Jonathan Simowitz |</td><td nowrap style="border-color:rgb(213,15,37) rgb(211,211,211) rgb(211,211,211);border-width:2px 1px 1px;border-style:solid dotted dotted">Jigsaw |</td><td nowrap style="border-color:rgb(238,178,17) rgb(211,211,211) rgb(211,211,211);border-width:2px 1px 1px;border-style:solid dotted dotted"> Software Engineer |</td><td nowrap style="border-color:rgb(51,105,232) rgb(211,211,211) rgb(211,211,211);border-width:2px 1px 1px;border-style:solid dotted dotted"> <a href="mailto:simowitz@google.com" style="color:rgb(17,85,204)" target="_blank">simowitz@google.com</a> |</td><td nowrap style="border-color:rgb(0,153,57) rgb(211,211,211) rgb(211,211,211);border-width:2px 1px 1px;border-style:solid dotted dotted"> <br><font color="#222222"> 631-223-8608</font><br><br></td></tr></tbody></table></div></div></div></div></div></div></div>
</div></div>