1.描述
该模块可以为Tengine提供主动式后端服务器健康检查的功能。
该模块在Tengine-1.4.0版本以前没有默认开启,它可以在配置编译选项的时候开启:
./configure --with-http_upstream_check_module
2.配置
http{
check_shm_size 10M;
upstream cluster2 {
# 监控的服务器
server 192.168.2.200:8088;
server 192.168.2.233:8083;
check interval=3000 rise=2 fall=5 timeout=1000 type=http;
check_http_send "HEAD / HTTP/1.0\r\n\r\n";
check_http_expect_alive http_2xx http_3xx;
}
server {
listen 80;
location /status {
check_status;
access_log off;
}
}
}
3.参数说明
check指令后面的参数意义是