系统相关
首页 > 系统相关> > Nginx Upstream Backup 报错 502 Bad Gateway

Nginx Upstream Backup 报错 502 Bad Gateway

作者:互联网

也是线上遇到的问题, 假设nginx配置为

 

upstream  zed {
        server 192.168.0.1:3000 max_fails=3 fail_timeout=30s;
        server 192.168.0.2:3000 backup max_fails=3 fail_timeout=30s;
}

server {
    listen       80;
    server_name  zed.com;
    location / {
            proxy_pass http://zed/;
    }
}

 

如果 192.168.0.1:3000 和 192.168.0.1:3000 同时down掉, 且被nginx重试了3次。立马  192.168.0.1:3000 和 192.168.0.1:3000恢复的情况下,服务还会无法访问持续30s

标签:zed,0.1,30s,192.168,server,Nginx,报错,3000,502
来源: https://www.cnblogs.com/restful/p/13072215.html