30选5玩法|福彩30选5开奖结果321|

nginx 后端服务器健康检测验证

来源:本站原创 Linux 超过755 views围观 0条评论

健康检测验证

配置
upstream oaweb {
ip_hash;
server 172.16.1.25:80  max_fails=2 fail_timeout=10s;  #默认每1S检测一次 失败两次 10S内将不再分配连接
server 172.16.1.26:80  max_fails=2 fail_timeout=10s;
}

—-?#38382;?#35828;明—-
max_fails=number      # 设定Nginx与服务器通信的尝试失败的?#38382;?#22312;fail_timeout?#38382;?#23450;义的时间?#25991;冢?#22914;果失败的?#38382;?#36798;到此值,Nginx就认为服务器不可用。在下一个fail_timeout时间段,服务器不会再被尝试。 失败的尝?#28304;问?#40664;认是1。设为0就会停止统计尝?#28304;问?#35748;为服务器是一直可用的。 你可以通过指令proxy_next_upstream、fastcgi_next_upstream和 memcached_next_upstream来配置什么是失败的尝试。 默认配置时,http_404状态不被认为是失败的尝试。
fail_timeout=time       # 设定服务器被认为不可用的时间?#25105;?#21450;统计失败尝?#28304;问?#30340;时间段。在这段时间中,服务器失败?#38382;?#36798;到指定的尝?#28304;问?#26381;务器就被认为不可用。默认情况下,该超时时间是10秒。
 

—19秒报错—服务器1.25
2017/09/18 18:25:19 [error] 14625#0: *101 connect() failed (110: Connection timed out) while connecting to upstream, client: 172.16.11.104, server: 172.16.9.69, request: "GET /wui/theme/ecology8/page/getRemindInfo.jsp?1=1505730337541= HTTP/1.1", upstream: "http://172.16.1.25:80/wui/theme/ecology8/page/getRemindInfo.jsp?1=1505730337541=", host: "172.16.9.69", referrer: "http://172.16.9.69/wui/main.jsp"
2017/09/18 18:25:36 [error] 14625#0: *156 connect() failed (110: Connection timed out) while connecting to upstream, client: 172.16.11.104, server: 172.16.9.69, request: "GET /login/Login.jsp HTTP/1.1", upstream: "http://172.16.1.25:80/login/Login.jsp", host: "172.16.9.69", referrer: "http://172.16.9.69/wui/main.jsp"
2017/09/18 18:25:39 [error] 14625#0: *156 connect() failed (110: Connection timed out) while connecting to upstream, client: 172.16.11.104, server: 172.16.9.69, request: "GET /wui/theme/ecology7/page/images/desc_wev8.png HTTP/1.1", upstream: "http://172.16.1.25:80/wui/theme/ecology7/page/images/desc_wev8.png", host: "172.16.9.69", referrer: "http://172.16.9.69/login/Login.jsp"
—33秒切换—实测试 20S左右
172.16.11.104 – – [18/Sep/2017:18:25:33 +0800] "GET /login/Login.jsp HTTP/1.1" 499 0 "http://172.16.9.69/wui/main.jsp" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" "-"
172.16.11.104 – – [18/Sep/2017:18:25:36 +0800] "GET /login/Login.jsp HTTP/1.1" 200 41418 "http://172.16.9.69/wui/main.jsp" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" "-"
172.16.11.104 – – [18/Sep/2017:18:25:39 +0800] "GET /wui/theme/ecology7/page/images/desc_wev8.png HTTP/1.1" 404 759 "http://172.16.9.69/login/Login.jsp" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" "-"
172.16.11.104 – – [18/Sep/2017:18:25:41 +0800] "GET /login/Login.jsp HTTP/1.1" 200 41418 "http://172.16.9.69/wui/main.jsp" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" "-"

文章出自:CCIE那点事 http://www.rygqfb.tw/ 版权所?#23567;?#26412;站文章除注明出处外,皆为作者原创文章,可自由引用,但请注明来源。 禁止全文转载。
本文链接:http://www.rygqfb.tw/?p=3568转载请注明转自CCIE那点事
如果?#19981;叮?a title="CCIE那点事 | IT运维故障发现和解决基地 我致力于为企业IT管理提供助力!" href="http://www.rygqfb.tw/?feed=rss2" target="_blank">点此订阅本站
?
?
30选5玩法
同花配资 每日股票推荐 p2p理财平台评级 黄金配资 今日股票行情查询 微乐河南麻将辅助器安卓 安徽快3爱乐彩 现在有什么好股票推荐 家彩网3d开机号 北京快3开奖l结果