Welcome! Log In Create A New Profile

Advanced

Re: Default answer at proxy timeout

B.R.
November 26, 2014 09:50AM
n
​ginx provides​
​proxy_read_timeout
<http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout>
..
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.
You also have proxy_connect_timeout
<http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout>
and proxy_send_timeout
<http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout>
directives, if those are more suitable to you.

To craft a custom answer, I would use:
​error_page 504 @backend_timeout;
in the proxied location, associated with:
location @backend_timeout {
return 200 "\n";
}​
---
*B. R.*

On Wed, Nov 26, 2014 at 2:48 PM, Fritz Richter <fritz@adsquare.com> wrote:

> Hi together,
>
> 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.
>
> The requirement is saying, that in case we can not deliver our answer in
> 7ms, we need to respond with an empty String „\n“.
>
> 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?
>
> Thanks for your help
> fri
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Default answer at proxy timeout

Fritz Richter November 26, 2014 08:50AM

Re: Default answer at proxy timeout

B.R. November 26, 2014 09:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 229
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready