PoolingNHttpClientConnectionManager: what is timeToLive attribute for?
Asked Answered
P

1

7

I am trying to understand how does timeToLive attribute work?

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.

Playlet answered 22/9, 2016 at 16:38 Comment(0)
C
5

TTL parameter limits the total time to live of a persistent connection to a finite value. 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.

One of the purpose of the TTL parameter is ensure a more equal redistribution of persistent connection across a cluster of nodes.

Concertize answered 23/9, 2016 at 17:41 Comment(1)
Based on the name of the attribute, I had the same impression. But it was hard to find documentation that confirms the same. Thanks for the info.Playlet

© 2022 - 2024 — McMap. All rights reserved.