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