随着业务增长,nginx上负载均衡器的后端节点部署越来越多,需要对后端节点的运行状态进行监控,故引入阿里的健康检测模块nginx_upstream_check_module,通过它可以用来检测后端 realserver 的健康状态。
一、下载
1、nginx
http://nginx.org/download/nginx-1.9.2.tar.gz
2、nginx_upstream_check_module
http://github.com/yaoweibin/nginx_upstream_check_module
二、安装配置
1、文件列表信息
[root@iZ233438q9fZ upload]# ll
drwxr-xr-x 6 ftpuser ftp 4096 Aug 19 10:04 nginx_upstream_check_module
drwxr-xr-x 8 1001 1001 4096 Jun 16 2015 nginx-1.9.2.tar.gz
2、解压
[root@iZ233438q9fZ upload]# tar -zxvf nginx-1.9.2.tar.gz
[root@iZ233438q9fZ upload]# cd nginx-1.9.2
3、nginx补丁安装
[root@iZ233438q9fZ nginx-1.9.2]# patch -p0 < /var/ftp/upload/nginx_upstream_check_module/check_1.9.2+.patch
patching file src/http/modules/ngx_http_upstream_hash_module.c
patching file src/http/modules/ngx_http_upstream_ip_hash_module.c
patching file src/http/modules/ngx_http_upstream_least_conn_module.c
patching file src/http/ngx_http_upstream_round_robin.c
patching file src/http/ngx_http_upstream_round_robin.h
4、编译配置
[root@iZ233438q9fZ nginx-1.9.2]# ./configure --add-module=/var/ftp/upload/nginx_upstream_check_module --prefix=/usr/local/server/nginx
[root@iZ233438q9fZ nginx-1.9.2]# make && make install
三、nginx.conf健康检查配置样例
参数说明:
- check_status:[html|csv|json],默认html
- check_http_send:指定检测的http访问地址,默认/
- type:[tcp|http|ssl_hello|mysql|ajp],默认tcp
- interval:向后端发送的健康检查包的间隔,单位(毫秒)
- fall(fall_count): 如果连续失败次数达到fall_count,服务器就被认为是down。
- rise(rise_count): 如果连续成功次数达到rise_count,服务器就被认为是up。
- timeout: 后端健康请求的超时时间。
PS:如果一直显示失败,请检查项目根目录中是否有index.jsp或index.html
- 大小: 18.5 KB
分享到:
相关推荐
官方nginx 镜像不带主动健康,本镜像将 nginx_upstream_check健康检查 打包到了镜像中。
Nginx所需环境的安装,及nginx安装,nginx相关功能开启,后端节点健康检查插件安装,静态资源缓存插件,缩略图插件安装等。
nginx_upstream_check_module模块,2019年11月6日18:11:19下载的
nginx后端节点健康检查模块插件,非常好用,淘宝开发。
借助淘宝技术团队开发的nginx模快nginx_upstream_check_module来检测后方realserver的健康状态,如果后端服务器不可用,则会将其踢出upstream,所有的请求不转发到这台服务器。当期恢复正常时,将其加入upstream。 ...
nginx_upstream_check_module-master,淘宝技术团队开发的,适用1.11
nginx1.16版本 后端节点健康检查、自动隔离+nginx_upstream_check_module-master+nginx-upload-module
docker容器中编译安装第三方后端检查模块nginx_upstream_check_module 使用方法见:https://blog.csdn.net/pcn01/article/details/105182600
生产版nginx最新版本Dockerfile 添加主动检查nginx_upstream_check_module等第三方模块,
开源check模块,可以检查http、tcp健康 https://github.com/yaoweibin/nginx_upstream_check_module 官方tcp模块,配置stream {} 也可以代理tcp,--with-http_stub_status_module --with-stream ...
nginx tcp负载均衡模块 配置方法: tcp { upstream nettyserver { server 192.168.3.57:9000; server 192.168.3.57:8000; check interval=3000 rise=2 fall=5 timeout=10000; } server { listen 26888; proxy...
介绍该模块可以在纯 nginx-1.4.7 中用于检查上游服务器,并应用了几个补丁。 该模块的主要目的是为上游服务器添加主动健康检查。 核心源文件来自阿里巴巴开发维护的Tengine。 有关更多详细信息,请查看。概要 ...
windows1.12版本,解压之后就能用,windows1.12版本,解压之后就能用,
官网都可以下到,这里整合一下依赖记录一下,嫌挨个下麻烦的,可以用这个 ./configure --prefix=/usr/local/nginx-1.25.3 \ ... --add-module=../nginx_upstream_check_module-0.4.0/ make sudo make install
headers-more-nginx-module-0.33.tar、nginx_upstream_check_module-0.3.0.tar、openssl-1.1.1k.tar
upstream_check_module的心跳机制开源模块。应用于实现后端节点健康检查功能
nginx反向代理负载均衡和session会话保持详细配置,附带必须软件包,nginx-sticky-module-1.1,nginx_upstream1.1,pcre-8.35, nginx-1.6.0, nginx_upstream_check_module-master
在tengine的ngx_http_upstream_check_module的基础上增加了udp检测和https检测的功能。目前只能在tengine上面跑,如果需要在官方nginx上跑,需要修改nginx的负载均衡模块的部分代码
1、nginx-1.8.0.tar.gz 2、附带淘宝控件健康检查 nginx_upstream_check_module-master.zip 安装详细介绍: http://blog.csdn.net/hgg923/article/details/50698938