title: HttpClients PoolingHttpClientConnectionManager and DNS caching
body: <p>So I seem to be having an issue related to the caching of DNS host name resolution when using PoolingHttpClientConnectionManager. I have an api that makes calls out to an outside service. This service uses Akamai edge caching so it's possible for the ip address to change. This api is under heavy load. I have 100 connections max set for the pool size with an idle timeout thread closing idle connections after 30 seconds being idle. But with the heavy traffic, I don't think connections are ever idle. So it seems that if the IP address changes for this services host, my app never picks up that change since all connections in the pool are holding on to the old DNS resolved ip address. </p>
  
  <p>I've tested this hypothesis locally by changing my /etc/hosts file on my mac (and flushing the os cache). As long as there is steady traffic against my API app, it never picks up the change even with a TTL of 5 seconds set in java.security. I let it run for 20 minutes after changing the hostname to point to an invalid ip address that would cause calls to fail, and it never failed. I stopped the JMeter traffic I was sending it, waiting about 30 seconds and hit it manually, and the call failed, telling me it picked up the change. </p>
  
  <p>Any ideas? Do I need to stop using the connection pool? Or write my own DnsResolver (not sure how it should work)? How can I ensure that the connections in my connection pool will update if the DNS entry changes for this service? </p>