› NGINX
› NGINX Trac
› 3rd Party Modules
› Security Advisories
› CHANGES
› OpenResty
› ngx_lua
› Tengine
在线学习资源
› NGINX 开发从入门到精通
NGINX Modules
› ngx_echo
yuyuyu
V2EX  ›  NGINX

如何禁用 proxy_next_upstream_tries 重试?

  •  
  •   yuyuyu · Jan 10, 2017 · 5853 views
    This topic created in 3587 days ago, the information mentioned may be changed or developed.

    Syntax: proxy_next_upstream_tries number; Default: proxy_next_upstream_tries 0; Context: http, server, location This directive appeared in version 1.7.5. Limits the number of possible tries for passing a request to the next server. The 0 value turns off this limitation.

    我不希望 nginx 重试, proxy_next_upstream_tries 不能设置成 0 ,否则就是不停的将请求发到其他的后端服务器,也不能 proxy_next_upstream off ,我还是希望 nginx 能记住这服务器 down 掉了下次请求能发到其他的服务器,好像没办法做到?一定要 proxy_next_upstream_tries 1 重试一次么?

    3 replies  •  2017-01-11 08:06:06 +08:00
    Citrus
    Citrus
    Jan 10, 2017
    1
    proxy_next_upstream off 并不代表 Nginx 不会记住这台服务器 Down 了。
    yuyuyu
    yuyuyu
    OP
    Jan 10, 2017 via Android
    2
    @Citrus 我测试过 proxy_next_upstream off 之后故障转移就失效了, max_fails 无效,之后的请求会继续落在 down 掉的机器上
    feijilei
    feijilei
    Jan 11, 2017 via iPhone
    3
    1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1801 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 06:01 · PVG 14:01 · LAX 22:01 · JFK 01:01
    ♥ Do have faith in what you're doing.