<div dir="ltr">n<div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​ginx provides​</div> <div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​<a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout">proxy_read_timeout</a>.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">However, as documentation states, the timeout is set between messages, so a fragmented answer which takes less than the timeout for each part will succeed.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">You also have <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout">proxy_connect_timeout</a> and <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout">proxy_send_timeout</a> directives, if those are more suitable to you.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline"><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">To craft a custom answer, I would use:<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><span style="font-family:monospace">​error_page 504 @backend_timeout;</span><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">in the proxied location, associated with:<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><span style="font-family:monospace">location @backend_timeout {<br></span></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><span style="font-family:monospace">    return 200 "\n";<br></span></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><span style="font-family:monospace">}​</span></div><div class="gmail_extra"><div><div class="gmail_signature"><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 Wed, Nov 26, 2014 at 2:48 PM, Fritz Richter <span dir="ltr"><<a href="mailto:fritz@adsquare.com" target="_blank">fritz@adsquare.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi together,<br>
<br>
we have a nginx Server serving our requests. Based on our SLAs we need to answer always in 7ms time. Behind the nginx Server, there is a Java Backend, which we proxy through the nginx.<br>
<br>
The requirement is saying, that in case we can not deliver our answer in 7ms, we need to respond with an empty String „\n“.<br>
<br>
Is there a ways to configure nginx in that way, that after the 7ms timeframe it will not wait for the backend systems answer but respond with this empty String?<br>
<br>
Thanks for your help<br>
fri<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div><br></div></div>