[英]Why no TIME-WAIT connect when using haproxy with redis
I'm using Haproxy to check Redis server living status. 我正在使用Haproxy检查Redis服务器的生存状态。 One problem we may always face is, no enough port available after a while, cuz Haproxy might leave a ton of TIME-WAIT sockets there. 我们可能一直面临的一个问题是,一段时间后没有足够的端口可用,因为Haproxy可能会在那里留下大量的TIME-WAIT套接字。 But, in fact, I cannot find any TIME-WAIT socket when using haproxy+redis. 但是,实际上,使用haproxy + redis时找不到任何TIME-WAIT套接字。 Cannot understand why. 不明白为什么。
Any thoughts? 有什么想法吗? Thanks. 谢谢。
see fd.c: 参见fd.c:
setsockopt(fd, SOL_SOCKET, SO_LINGER,
(struct linger *) &nolinger, sizeof(struct linger));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.