Thanks for your answer.<br><br>So to Nginx, an upstream server is either good (operative) or bad (inoperative).&nbsp; In good state, if it fails <i>max_fails</i> times within <i>fail_timeout</i> period of time, Nginx switches its state to bad.&nbsp; If not, it stays good.&nbsp; In bad state, Nginx will try the server every <i>fail_timeout</i> time, if succeeds, its state is switched back to good, otherwise it stays bad.&nbsp; Nginx only dispatches requests to good servers.&nbsp; Any problem with this summary?<br>
<br><br>Steve<br><br><div class="gmail_quote">2009/2/19 Anton Yuzhaninov <span dir="ltr">&lt;<a href="mailto:citrin@citrin.ru">citrin@citrin.ru</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Sun Yijiang wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m new to nginx, spent a morning reading nginx documentation. &nbsp;I&#39;m still not clear how nginx determines the status of upstream servers. &nbsp;Let&#39;s say we have some upstream servers, all set to max_fails=3 and fail_timeout=30s. &nbsp;According to the document, if one server fails 3 times within 30s time, nginx will mark this server to be inoperative and won&#39;t direct any request to it. &nbsp;Is that right?<br>

</blockquote>
<br></div>
Right<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&nbsp;Then the question is: will nginx try this server again later to see if it recovers?<br>
</blockquote>
<br></div>
Yes, it will try to send requests after fail_timeout.<br>
<br>
So fail_timeout used twice - errors counted for fail_timeout, and upstream marked as dead for<br>
fail_timeout.<br>
<br>
-- <br><font color="#888888">
&nbsp;Anton Yuzhaninov<br>
<br>
</font></blockquote></div><br>