简体   繁体   English

PoolingNHttpClientConnectionManager:timeToLive 属性有什么用?

[英]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?这是当您从池中获取连接时,故意关闭连接并返回池的时间间隔吗?

API 应用程序接口

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.

相关问题 使用PoolingNHttpClientConnectionManager在HttpClient上禁用SSL - Disable SSL on HttpClient with PoolingNHttpClientConnectionManager PoolingHttpClientConnectionManager与PoolingNHttpClientConnectionManager - PoolingHttpClientConnectionManager vs. PoolingNHttpClientConnectionManager JMS超时或TimeToLive - JMS Timeout or TimeToLive HttpAsyncClient PoolingNHttpClientConnectionManager.requestConnection返回失败? - HttpAsyncClient PoolingNHttpClientConnectionManager.requestConnection failed to return? 如何让TimeToLive在JmsTemplate上工作? - How to get TimeToLive working on JmsTemplate? PoolingNHttpClientConnectionManager的requestConnection在Apache HttpAsyncClient中如何工作? - How does requestConnection for PoolingNHttpClientConnectionManager work in Apache HttpAsyncClient? JMS Producer中的TimeToLive杀死了我的消息 - TimeToLive in JMS Producer kills my Message 如何通过AJAX在ActiveMQ中设置TimeToLive参数? - How to set TimeToLive Parameter in ActiveMQ via AJAX? Tibco JMS(EMS)每个客户的TimeToLive? - Tibco JMS (EMS) TimeToLive per client? 什么是 HttpSession 中的 __flexSession 属性 - what is __flexSession attribute in HttpSession
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM