-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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.
The text was updated successfully, but these errors were encountered: