Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PoolingNHttpClientConnectionManager: what is timeToLive attribute for?

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.

like image 301
jagamot Avatar asked Sep 22 '16 16:09

jagamot


1 Answers

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.

like image 138
ok2c Avatar answered Nov 01 '22 20:11

ok2c