6

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.

jagamot
  • 5,348
  • 18
  • 59
  • 96

1 Answers1

4

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.

ok2c
  • 26,450
  • 5
  • 63
  • 71
  • 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. – jagamot Sep 24 '16 at 16:13