【nginx+lua】dynamic update upstream, health checks

本文介绍使用Nginx结合Lua模块实现后端节点动态更新的方法,包括upsync模块、slardar、tengine+dyups模块及consul的集成方案,为负载均衡和高可用性提供技术支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Nginx + Lua 实现动态更新后端节点,主动监控检测方案:
1、nginx + upsync 模块
https://github.com/weibocom/nginx-upsync-module
https://github.com/xiaokai-wang/nginx-stream-upsync-module 支持TCP转发
https://github.com/CallMeFoxie/nginx-upsync
2、右拍云的slardar
https://github.com/upyun/slardar
3. tengine + ngx_http_dyups_module
https://github.com/yzprofile/ngx_http_dyups_module
https://github.com/alibaba/tengine/blob/d271c477f9f8dd18411145853536cc947cc74e0d/docs/modules/ngx_http_dyups_module.md
http://www.ttlsa.com/nginx/nginx-modules-ngx_http_dyups_module/
4. consul nginx template
consul template定义nginx配置文件模版,从consul上读取server信息(ip + port),然后更新nginx,并reload nginx. 这些都是consul帮助实现的,不过还是有reload操作。

业务相关实现代码:
https://github.com/easemob/SwallowKeeper
https://www.jianshu.com/p/59d7173c78a9

转载于:https://blog.51cto.com/strongit/2327010

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值