公司前一段对业务线上的nginx做了整理,重点就是对nginx上负载均衡器的后端节点做健康检查。目前,nginx对后端节点健康检查的方式主要有3种,这里列出:
1、ngx_http_proxy_module 模块和ngx_http_upstream_module模块(自带)
官网地址:http://nginx.org/cn/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
2、nginx_upstream_check_module模块
官网网址:https://github.com/yaoweibin/nginx_upstream_check_module
3、ngx_http_healthcheck_module模块
官网网址:http://wiki.nginx.org/NginxHttpHealthcheckModule
公司业务线上对后端节点的健康检查是通过nginx_upstream_check_module模块做的,这里我将分别介绍这三种实现方式以及之间的差异性。