Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[ManagedHandler] Add equivalent of ServicePoint.ConnectionLeaseTimeout #24665
Comments
It seems like an alternative to that, rather than being a way to implement that? |
|
(hit wrong button :) |
|
Yes, that's correct. If we had proper TTL handling, we (probably) wouldn't need ConnectionLeaseTimeout. Supporting ConnectionLeaseTimeout gives us a way to make DNS TTL-based routing work reasonably well, without actually retrieving and respecting the TTL. |
|
Related discussions: aspnet/HttpClientFactory#44 |
|
@Tratcher What's the difference between the two? Seems like we probably don't need both, but which is preferable for DNS TTL scenarios? |
|
It's an artifact of the ServicePoint impelementation, you won't necessarily need both settings, but you will need to cover the end-to-end scenario. ServicePoint internally caches DNS resolves for the given DnsRefreshTimeout. It also re-uses connections for the given ConnectionLeaseTimeout. The two are implemented separately, it doesn't drop all active connections when it does a DNS refresh, nor refresh DNS for every new connection. Things for ManagedHandler to address:
Really people expect basic load ballancer functionality to be built in, rather than using a dedicated load ballancer intermediate. |
This is necessary to support DNS based routing with TTLs. See #18348 for more details.