当前位置: 首页 > news >正文

Nginx 1.26+ 的主动 upstream 健康检查模块。

nginx-healthcheck-module

  • 博客链接
  • GitHub链接

用于 Nginx 1.26+ 的主动 upstream 健康检查模块。

本项目由 Akvicor 维护,修改自
yaoweibin/nginx_upstream_check_module。
当前版本保留主动健康检查模型,适配新版 Nginx upstream 内部结构,并聚焦于
http 与 stream upstream 的 TCP/UDP 检查。

因原项目无法适配新版本Nginx, 会导致检测异常,TIME_WAIT数量激增等各种问题, 因此这个版本中剔除了tcp/udp检查外的其他上游检查功能,增加了延迟统计,增加了TCP复用。

功能

  • 支持 Nginx 1.26+,仓库内提供对应 upstream 补丁。
  • 支持主动 type=tcp 和 type=udp 健康检查。
  • 支持 http upstream 和 stream upstream。
  • 可在 Nginx upstream 负载均衡过程中跳过不健康后端。
  • 状态接口支持 htmlcsvjsonprometheus 输出。
  • 状态输出中包含检查延迟统计:最后一次、平均、最小、最大延迟,单位毫秒。
  • 支持 TCP 健康检查连接复用:reuse=on

原项目中的 HTTP、FastCGI、MySQL、AJP、SSL hello 等七层检查,在当前维护版本中不再支持。

兼容性

  • 目标 Nginx 版本:1.26+。
  • 模块必须通过 --add-module 静态编译。
  • 暂不支持动态模块加载。
  • stream 健康检查要求 Nginx 编译时启用 --with-stream

仓库内补丁会为 Nginx 内置 HTTP 和 Stream upstream 负载均衡器添加主动健康检查过滤,
包括 round robin、hash、consistent hash、适用场景下的 ip_hash,以及 least_conn。

安装

git clone https://github.com/nginx/nginx.git
git clone https://github.com/Akvicor/nginx-healthcheck-module.gitcd nginx
git checkout release-1.26.3
git apply ../nginx-healthcheck-module/nginx_healthcheck_for_nginx_1.26+.patch./auto/configure --with-stream --add-module=../nginx-healthcheck-module
make
make install

请保留你当前 Nginx 构建所需的其他 configure 参数。如果需要 stream {} 健康检查,
需要保留 --with-stream

已编译好的debian源

先导入GPG密钥,用于验证包

curl -fsSL https://cdn.ksyaki.com/debian/nginx-team/public-key.asc \| gpg --dearmor --batch --yes -o /usr/share/keyrings/akvicor.gpg

Debian 13

tee /etc/apt/preferences.d/99-akvicor-nginx.pref >/dev/null <<'EOF'
Package: nginx nginx-* libnginx-mod-*
Pin: origin cdn.ksyaki.com
Pin-Priority: 1001
EOFecho "deb [signed-by=/usr/share/keyrings/akvicor.gpg] https://cdn.ksyaki.com/debian/nginx-team trixie main" \| tee /etc/apt/sources.list.d/akvicor-nginx.listapt update
apt install nginx

Debian 12

tee /etc/apt/preferences.d/99-akvicor-nginx.pref >/dev/null <<'EOF'
Package: nginx nginx-* libnginx-mod-*
Pin: origin cdn.ksyaki.com
Pin-Priority: 1001
EOFecho "deb [signed-by=/usr/share/keyrings/akvicor.gpg] https://cdn.ksyaki.com/debian/nginx-team bookworm main" \| tee /etc/apt/sources.list.d/akvicor-nginx.listapt update
apt install nginx

https://weibo.com/ttarticle/p/show?id=2309405301430013001793
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301430013001793
https://weibo.com/ttarticle/p/show?id=2309405301430180511752
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301430180511752
https://weibo.com/ttarticle/p/show?id=2309405301430344351818
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301430344351818
https://weibo.com/ttarticle/p/show?id=2309405301430528901129
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301430528901129
https://weibo.com/ttarticle/p/show?id=2309405301430692216953
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301430692216953
https://weibo.com/ttarticle/p/show?id=2309405301430859989022
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301430859989022
https://weibo.com/ttarticle/p/show?id=2309405301431028023417
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301431028023417
https://weibo.com/ttarticle/p/show?id=2309405301431195795520
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301431195795520
https://weibo.com/ttarticle/p/show?id=2309405301431359111307
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301431359111307
https://weibo.com/ttarticle/p/show?id=2309405301431531339952
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301431531339952
https://weibo.com/ttarticle/p/show?id=2309405301431698849880
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301431698849880
https://weibo.com/ttarticle/p/show?id=2309405301432151834719
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432151834719
https://weibo.com/ttarticle/p/show?id=2309405301432210817387
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432210817387
https://weibo.com/ttarticle/p/show?id=2309405301432273731606
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432273731606
https://weibo.com/ttarticle/p/show?id=2309405301432332189876
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432332189876
https://weibo.com/ttarticle/p/show?id=2309405301432391172211
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432391172211
https://weibo.com/ttarticle/p/show?id=2309405301432454086769
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432454086769
https://weibo.com/ttarticle/p/show?id=2309405301432512544896
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432512544896
https://weibo.com/ttarticle/p/show?id=2309405301432571265255
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432571265255
https://weibo.com/ttarticle/p/show?id=2309405301432634179726
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432634179726
https://weibo.com/ttarticle/p/show?id=2309405301432692899975
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432692899975
https://weibo.com/ttarticle/p/show?id=2309405301432756076594
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432756076594
https://weibo.com/ttarticle/p/show?id=2309405301432814534675
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432814534675
https://weibo.com/ttarticle/p/show?id=2309405301432873517129
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432873517129
https://weibo.com/ttarticle/p/show?id=2309405301432931975278
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432931975278
https://weibo.com/ttarticle/p/show?id=2309405301432990957771
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301432990957771
https://weibo.com/ttarticle/p/show?id=2309405301433049677911
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433049677911
https://weibo.com/ttarticle/p/show?id=2309405301433120718968
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433120718968
https://weibo.com/ttarticle/p/show?id=2309405301433179701313
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433179701313
https://weibo.com/ttarticle/p/show?id=2309405301433238159473
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433238159473
https://weibo.com/ttarticle/p/show?id=2309405301433296879938
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433296879938
https://weibo.com/ttarticle/p/show?id=2309405301433355862170
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433355862170
https://weibo.com/ttarticle/p/show?id=2309405301433418776590
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433418776590
https://weibo.com/ttarticle/p/show?id=2309405301433477234738
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433477234738
https://weibo.com/ttarticle/p/show?id=2309405301433535955047
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433535955047
https://weibo.com/ttarticle/p/show?id=2309405301433594937448
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433594937448
https://weibo.com/ttarticle/p/show?id=2309405301433653395582
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433653395582
https://weibo.com/ttarticle/p/show?id=2309405301433712378139
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433712378139
https://weibo.com/ttarticle/p/show?id=2309405301433775030312
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433775030312
https://weibo.com/ttarticle/p/show?id=2309405301433833750807
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433833750807
https://weibo.com/ttarticle/p/show?id=2309405301433892470943
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433892470943
https://weibo.com/ttarticle/p/show?id=2309405301433951453336
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301433951453336
https://weibo.com/ttarticle/p/show?id=2309405301434009911448
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301434009911448
https://weibo.com/ttarticle/p/show?id=2309405301434073088016
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301434073088016
https://weibo.com/ttarticle/p/show?id=2309405301434131808270
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301434131808270
https://weibo.com/ttarticle/p/show?id=2309405301434190266434
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301434190266434
https://weibo.com/ttarticle/p/show?id=2309405301434249248950
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301434249248950
https://weibo.com/ttarticle/p/show?id=2309405301434307707057
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301434307707057
https://weibo.com/ttarticle/p/show?id=2309405301373834494239
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301373834494239
https://weibo.com/ttarticle/p/show?id=2309405301373897146393
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301373897146393
https://weibo.com/ttarticle/p/show?id=2309405301373955866649
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301373955866649
https://weibo.com/ttarticle/p/show?id=2309405301374014586901
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374014586901
https://weibo.com/ttarticle/p/show?id=2309405301374073307229
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374073307229
https://weibo.com/ttarticle/p/show?id=2309405301374136484104
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374136484104
https://weibo.com/ttarticle/p/show?id=2309405301374199398429
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374199398429
https://weibo.com/ttarticle/p/show?id=2309405301374257856535
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374257856535
https://weibo.com/ttarticle/p/show?id=2309405301374316839141
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374316839141
https://weibo.com/ttarticle/p/show?id=2309405301374375297387
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374375297387
https://weibo.com/ttarticle/p/show?id=2309405301374438473814
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374438473814
https://weibo.com/ttarticle/p/show?id=2309405301374497194005
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374497194005
https://weibo.com/ttarticle/p/show?id=2309405301374555914245
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374555914245
https://weibo.com/ttarticle/p/show?id=2309405301374610178226
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301374610178226
https://weibo.com/ttarticle/p/show?id=2309405301329118757359
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329118757359
https://weibo.com/ttarticle/p/show?id=2309405301329181671449
https://weibo.com/ttarticle/p/show?id=2309405301329240391826
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329240391826
https://weibo.com/ttarticle/p/show?id=2309405301329303306258
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329303306258
https://weibo.com/ttarticle/p/show?id=2309405301329362026683
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329362026683
https://weibo.com/ttarticle/p/show?id=2309405301329420746992
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329420746992
https://weibo.com/ttarticle/p/show?id=2309405301329479467102
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329479467102
https://weibo.com/ttarticle/p/show?id=2309405301329542381831
https://weibo.com/ttarticle/p/show?id=2309405301329618141314
https://weibo.com/ttarticle/p/show?id=2309405301329697833241
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329697833241
https://weibo.com/ttarticle/p/show?id=2309405301329760485417
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329760485417
https://weibo.com/ttarticle/p/show?id=2309405301329827594319
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329827594319
https://weibo.com/ttarticle/p/show?id=2309405301329899159657
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301329970200618
https://weibo.com/ttarticle/p/show?id=2309405301330028920904
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330028920904
https://weibo.com/ttarticle/p/show?id=2309405301330087903335
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330146623495
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330205081672
https://weibo.com/ttarticle/p/show?id=2309405301330272190495
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330272190495
https://weibo.com/ttarticle/p/show?id=2309405301330330910783
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330330910783
https://weibo.com/ttarticle/p/show?id=2309405301330582569334
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330582569334
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330645745689
https://weibo.com/ttarticle/p/show?id=2309405301330704465926
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330704465926
https://weibo.com/ttarticle/p/show?id=2309405301330762924040
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330821644327
https://weibo.com/ttarticle/p/show?id=2309405301330880626790
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330880626790
https://weibo.com/ttarticle/p/show?id=2309405301330939347091
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330939347091
https://weibo.com/ttarticle/p/show?id=2309405301330997805110
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301330997805110
https://weibo.com/ttarticle/p/show?id=2309405301331056787611
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301331056787611
https://weibo.com/ttarticle/p/show?id=2309405301331115507810
https://weibo.com/ttarticle/p/show?comment=1&id=2309405301331115507810

 

 
http://www.zskr.cn/news/1348712.html

相关文章:

  • python智能AI技术的中药材店铺管理系统 中药材网上商城系统 46n363df
  • 探索AI图像智能标注新范式:ComfyUI JoyCaptionAlpha Two插件深度指南
  • 保姆级教程:用R语言ggplot2和ggchicklet绘制染色体目标区间图(附完整代码与数据文件)
  • 告别开机慢和数据丢失:为不带电池的RK3588设备定制Android系统(关闭加密+EXT4实战)
  • 深度解析YOLOv8在ROS 2中的智能视觉集成方案:5大优势与实战指南
  • 解锁微信QQ语音的钥匙:silk-v3-decoder音频转换全攻略
  • 回归控制混杂偏倚的过程 【9天实用统计学公益训练营Day3-2】
  • ANSYS License服务启动失败?手把手教你用netstat和lmtools搞定1055端口占用
  • 终极指南:5分钟免费提升Windows CPU性能7%的完整教程
  • 技术深度解析:ExplorerPatcher解决Windows更新后开始菜单重置问题的原理与实践
  • Determined AI:面向大模型训练的声明式调度与确定性执行平台
  • Py6s + 6S模型:用Python自动化遥感大气校正的完整工作流搭建(Windows环境)
  • ARM PMUv3性能监控单元架构与多核配置详解
  • 如何用ExplorerPatcher解决Windows更新后开始菜单重置问题:完整实战指南
  • Vivado里那些AXI IP核,你真的用对了吗?一个波形图带你避开新手常见误区
  • BrowserOS下载与体验:开源AI浏览器,比Chrome更懂AI自动化
  • 2026年阿里云OpenClaw/Hermes Agent配置Token Plan安装超全攻略
  • 避坑指南:在Jetson Orin Nano上编译支持CUDA的OpenCV 4.5.3,我踩过的雷都在这了
  • 2026株洲奢侈品回收市场观察:包包回收迈入规范时代,湘奢汇(天元店)领衔五大靠谱机构 - 生活测评小能手
  • 别再手动复制粘贴了!用Java和poi-tl 1.6.0自动生成Word理财报告(附完整源码)
  • 百度网盘提取码智能获取:3分钟掌握高效资源解锁终极指南
  • 别再手动配环境了!用Docker Compose部署Milvus 2.3.1单机版,附Attu管理工具和MinIO存储查看
  • 观察Taotoken按Token计费模式下的月度支出清晰度
  • ARMv8 AArch32异步异常处理与路由控制详解
  • 使用curl命令直接调试taotoken大模型api接口的详细方法
  • 别再让电池一天一充!用STM32F103的PWR模块,把你的物联网设备续航提升10倍
  • 【MATLAB】图像压缩编码与传输优化算法研究与实现
  • 避坑指南:用STM32F103的TIM3编码器模式读取霍尔电机脉冲,为什么你的数值总不对?
  • 【MATLAB】运动控制模型嵌入式C代码生成
  • 别再死记硬背引脚了!拆解NE555内部电路,搞懂它为啥能当波形发生器