Tengine新增健康检查模块

 

 

总结

2.tengine的状态监控

Tengine的状态监控有两种

 

这里演示一个健康检查模块功能

配置一个status的location

location /status {

            check_status;

        }

在upstream配置如下

check interval=3000 rise=2 fall=5 timeout=1000 type=http;

check_http_send "HEAD / HTTP/1.0 ";

check_http_expect_alive http_2xx http_3xx;

这里可以故意出个问题,修改tomcat里面的index.jsp然后head里面有个引用css文件,会导致遵循轮询的机制出问题,可以通过nginx的acess的日志查看。

原文地址:https://www.cnblogs.com/zlslch/p/6036697.html