[英]PoolingNHttpClientConnectionManager: what is timeToLive attribute for?
I am trying to understand how does timeToLive attribute work?我想了解 timeToLive 属性如何工作?
Is this when you get a connection out of the pool, the time interval after which the connection is deliberately closed and returned to the pool?这是当您从池中获取连接时,故意关闭连接并返回池的时间间隔吗?
I want my client that was using persistent connections to close every few seconds, so the requests to load-balancer are going to new server every few seconds.我希望使用持久连接的客户端每隔几秒关闭一次,因此对负载均衡器的请求每隔几秒就会发送到新服务器。
TTL parameter limits the total time to live of a persistent connection to a finite value. TTL 参数将持久连接的总生存时间限制为有限值。 Regardless of keep-alive value returned by the server or client side keep-alive strategy a connection will never be re-used beyond its TTL.
无论服务器或客户端保持连接策略返回的保持连接值如何,连接都不会在其 TTL 之后被重用。
One of the purpose of the TTL parameter is ensure a more equal redistribution of persistent connection across a cluster of nodes. TTL 参数的目的之一是确保跨节点集群更平等地重新分配持久连接。
@jagmot @ok2c I am getting a value of -1 in timetolive field. @jagmot @ok2c 我在 timetolive 字段中得到 -1 的值。 What does it signify?
它意味着什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.