<div>Here is my flow: client - nginx - upstream - real upstream</div><div><br></div>Upstream is getting the response from the 'real' upstream. So if real upstream is wrong, nginx will get standard 5xx from upstream and in this case I don't really want nginx to try next upstream because it will hit the same bad real upstream with the same error code. In other cases where real upstream is good but one upstream is having too much load or wants to finish up in flight requests then go down for maintenance , is it possible for upstream to send a soft error code to nginx to tell it try next upstream.?<span></span><br><br>On Friday, December 11, 2015, B.R. <<a href="mailto:reallfqq-nginx@yahoo.fr">reallfqq-nginx@yahoo.fr</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">If the upstream refuses to process a request, you might wish to emulate an unavailable service or a lack of response (timeout). Backend up and working are expected to process requests.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Switching between legitimate errors and faked one will be done by monitoring backend logs.<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">There is no such thing as a 'Coffee Break' HTTP code. :oP<br></div><div class="gmail_extra"><div><div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Thu, Dec 10, 2015 at 9:20 PM, Frank Liu <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','gfrankliu@gmail.com');" target="_blank">gfrankliu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No, 503 may be a legitimate error from upstream that nginx needs to pass to client.<div>I am thinking some unused code , say, 590.<div><div><span></span><br><br>On Thursday, December 10, 2015, B.R. <<a href="javascript:_e(%7B%7D,'cvml','reallfqq-nginx@yahoo.fr');" target="_blank">reallfqq-nginx@yahoo.fr</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:small;color:rgb(51,51,153)">Like... 503?<br></div><div style="font-size:small;color:rgb(51,51,153)">To me 'server wants to make another upstream dealing with the request' sounds very much like 'Service Unavailable'.<br></div><div class="gmail_extra"><div><div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Thu, Dec 10, 2015 at 5:34 PM, Frank Liu <span dir="ltr"><<a>gfrankliu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div><br></div><div>There are a few options for when to try next upstream : <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream" target="_blank">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream</a></div><div><br></div><div>Is it possible to configure a custom http code so that upstream servers can send that code if it wants to send nginx to upstream ?</div><div><br></div><div>Thanks</div><span><font color="#888888"><div>Frank</div>
</font></span><br>_______________________________________________<br>
nginx mailing list<br>
<a>nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div>
</blockquote></div></div></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','nginx@nginx.org');" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div>
</blockquote>