Thanks for your answer.<br><br>So to Nginx, an upstream server is either good (operative) or bad (inoperative). 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. If not, it stays good. 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. Nginx only dispatches requests to good servers. Any problem with this summary?<br>
<br><br>Steve<br><br><div class="gmail_quote">2009/2/19 Anton Yuzhaninov <span dir="ltr"><<a href="mailto:citrin@citrin.ru">citrin@citrin.ru</a>></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'm new to nginx, spent a morning reading nginx documentation. I'm still not clear how nginx determines the status of upstream servers. Let's say we have some upstream servers, all set to max_fails=3 and fail_timeout=30s. According to the document, if one server fails 3 times within 30s time, nginx will mark this server to be inoperative and won't direct any request to it. 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;">
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">
Anton Yuzhaninov<br>
<br>
</font></blockquote></div><br>