为什么在 apache httpclient connectionPool 中过时连接检查不是 100% 可靠
Why the stale connection check is not 100% reliable in apache httpclient connectionPool
在文档的 2.5. Connection eviction policy
部分
connection managment doc 对于 http 客户端
提到
HttpClient tries to mitigate the problem by testing whether the connection is 'stale', that is no longer valid because it was closed on the server side, prior to using the connection for executing an HTTP request. The stale connection check is not 100% reliable.
我只是想知道为什么不能可靠地检查过时的连接?
什么 logical/TCP 构造不允许它可靠地发生?
这是微不足道的。在成功的过时检查和请求执行之间总是有 window 的时间,无论多么短,在这段时间内,对端端点可以关闭其端的连接并使客户端的连接过时。
在文档的 2.5. Connection eviction policy
部分
connection managment doc 对于 http 客户端
提到
HttpClient tries to mitigate the problem by testing whether the connection is 'stale', that is no longer valid because it was closed on the server side, prior to using the connection for executing an HTTP request. The stale connection check is not 100% reliable.
我只是想知道为什么不能可靠地检查过时的连接? 什么 logical/TCP 构造不允许它可靠地发生?
这是微不足道的。在成功的过时检查和请求执行之间总是有 window 的时间,无论多么短,在这段时间内,对端端点可以关闭其端的连接并使客户端的连接过时。