yaoweibin / nginx_tcp_proxy_module

add the feature of tcp proxy with nginx, with health check and status monitor
http://yaoweibin.github.com/nginx_tcp_proxy_module
1.64k stars 366 forks source link

tcp_check_status 的疑惑 #142

Open mirror222 opened 7 years ago

mirror222 commented 7 years ago

作者你好,

首先,太感谢你开发的tcp_proxy模块!!在使用中遇到两个问题,麻烦有空的时候给与解惑。

第一个问题. 修改 listen 端口reload后,tcp_check_status 无法查看到已经连接上活动连接,也就是Busyness 统计不正确。

a. 配置文件如下

tcp {
    upstream xx_server {
        server 192.168.1.50:3005;
        check interval=3000 rise=2 fall=5 timeout=1000;
    }
    server {
        **listen 85;** 
        proxy_pass xx_server;
    }
}

b. 客户端连接85端口,在/status 中可以看到 Busyness 数目为1 c. 修改配置文件的 85 端口 为 86, 然后reload nginx. 这个时候 Busyness 为0, 但其实我的客户端并没有断开。

第二个问题. 有办法主动断开某个活动的tcp 连接吗? 比如第一点中提交的例子,有多个客户端连接到服务器,我踢掉某个客户端。

谢谢。