nginx-upsync-module icon indicating copy to clipboard operation
nginx-upsync-module copied to clipboard

在关闭后端服务器时,怎么确认用户与后端服务器都断开连接了?

Open lework opened this issue 8 years ago • 3 comments
trafficstars

在向注册中心发送关闭后端服务器指令时,怎么确认后端服务器与nginx的连接全部断开?从而去关闭后端服务器的服务。 也就是upsync关闭后端服务器后,怎么确认nginx已经将后端服务器置为不可用。

lework avatar Dec 03 '16 09:12 lework

向注册中心注销server 后,nginx 会根据已有请求的处理情况摘除后短server;在nginx 层不能直观的看到,可以扫日志根据后端的server ip?

xiaokai-wang avatar Dec 03 '16 09:12 xiaokai-wang

我目前是在后端服务监控存活连接,在向注册中心发送关闭指令后,轮询检查与nginx的连接,没有后在关闭后端服务;nginx+中的ngx_http_static_module模块有对后端连接得监控,nginx-module-vts也有对后端的一些监控,但是监控不了upsync管理的后端,有没有考虑做下这类的简单监控,来达到知道后端服务已不在服务了,可以关闭\重启服务了。最后,非常感谢您能够回答我的问题,谢谢。

lework avatar Dec 04 '16 02:12 lework

感谢你的建议,这个应该需要两个模块支持一下,或者自己做;

一起学习;

xiaokai-wang avatar Dec 05 '16 09:12 xiaokai-wang