也是線上遇到的問(wèn)題, 假設(shè)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 同時(shí)down掉, 且被nginx重試了3次。立馬 192.168.0.1:3000 和 192.168.0.1:3000恢復(fù)的情況下,服務(wù)還會(huì)無(wú)法訪問(wèn)持續(xù)30s
浙公網(wǎng)安備 33010602011771號(hào)