Opened 2 years ago

Closed 2 years ago

#2317 closed defect (worksforme)

Whether after an upstream failure request may be repeated to the same upstream

Reported by: porton.victor@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.19.x
Keywords: Cc:
uname -a: Linux ip-172-31-68-17 5.13.0-1011-aws #12-Ubuntu SMP Wed Jan 12 19:36:55 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
nginx -V: nginx version: nginx/1.18.0 (Ubuntu)
built with OpenSSL 1.1.1l 24 Aug 2021
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -ffile-prefix-map=/build/nginx-qGTOXg/nginx-1.18.0=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/ --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --add-dynamic-module=/build/nginx-qGTOXg/nginx-1.18.0/debian/modules/http-geoip2 --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module

Description is unclear whether the request will be repeated in the case of a failure to the same upstream.

I want to repeat requests (currently having only one upstream). Please make it possible to repeat requests to the same upstream (or at least correct docs).

Change History (1)

comment:1 by Maxim Dounin, 2 years ago

Resolution: worksforme
Status: newclosed

The directive description says "to the next server", and it believed to clear enough: the same server doesn't clarify. If you want nginx to repeat the request to the same server again, you can do so by either defining additional server with the same address in the upstream block, or by configuring retries using error_page instead.

Note: See TracTickets for help on using tickets.