Opened 8 years ago
#1262 new enhancement
connect_(timeout|error) option in proxy_next_upstream
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-module | Version: | 1.10.x |
Keywords: | Cc: | ||
uname -a: | Linux 7ad2956b-1f7d-42ee-8bcc-41c63ae64958 4.4.0-53-generic #74~14.04.1-Ubuntu SMP Fri Dec 2 03:43:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.10.1
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configure arguments: --prefix=/var/vcap/packages/nginx --error-log-path=stderr --with-pcre=../pcre-8.39 --with-pcre-jit --add-module=../headers-more-nginx-module-0.31 --with-http_realip_module --with-http_stub_status_module |
Description
Currently proxy_next_upstream supports only "error" or "timeout", that are defined as:
error
an error occurred while establishing a connection with the server, passing a request to it, or reading the response header;
timeout
a timeout has occurred while establishing a connection with the server, passing a request to it, or reading the response header;
both conditions are pretty broad: it would be very helpful to have better control over which phase the error/timeout happens. In one of our use-cases it would be very useful to limit the failover to the connection establishment phase, i.e. something along those lines:
connect_error
an error occurred while establishing a connection with the server;
connect_timeout
a timeout has occurred while establishing a connection with the server;
We're running nginx 1.10.x on linux 4.4.x, but even in the current 1.13.x this is still not supported.