[
https://issues.apache.org/jira/browse/HTTPCLIENT-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913630#action_12913630
]
Oleg Kalnichevski commented on HTTPCLIENT-1000:
-----------------------------------------------
> 1) Add the notion of a TTL for c, and have ConnPoolByRoute factor this in
> when checking if an entry is expired
Michajlo,
I think BasicPoolEntry already has a mechanism for tracking time-to-live
(expiry attribute) which is updated based on the value of the Keep-Alive header
or by using a custom keep-alive strategy. Would it make sense to re-use it?
> We considered using HttpParams, but it would appear the relevant constructors
> were deprecated, therefor, does adding the argument to the
> constructor seem correct?
Yes, it does. I am trying to reduce the usage of HttpParams in those areas
where parameter hierarchies such as request - client - global are not
applicable.
> Currently our intended approach is to add a method to ManagedClientConnection
> to check the status of a connection
This can be tricky. We cannot introduce new methods to the
ManagedClientConnection without breaking compatibility with 4.0 API. We might
have to use an optional interface or interface extension for new methods.
Oleg
> Configure Maximum Connection Lifetimes
> --------------------------------------
>
> Key: HTTPCLIENT-1000
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1000
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient
> Reporter: Michajlo Matijkiw
>
> Provide a means of configuring a maximum lifetime for HttpClient connections.
> Currently, it would appear as long as a connection is used it may persist
> indefinitely.
> This would be useful for situations where HttpClient needs to react to DNS
> changes, such as the following situation that may occur when using DNS load
> balancing:
> - HttpClient maintains connections to example.com which resolves to IP A
> - Machine at IP A fails, and example.com now resolves to backup machine at
> IP B
> - Since IP A is failing, connections are destroyed, and new connections are
> made to IP B
> - Machine at IP A recovers, but HttpClient maintains connections to IP B
> since the connections are still healthy
> The desired behavior would be that connections to IP B will reach their
> connection lifetime, and new connections could be created back to IP A
> according to the updated DNS settings.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]