-
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
Improve handling of DNS changes by revalidating pooled SocketsHttpHandler connections periodically #60390
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsPutting @geoffkizer 's idea from dotnet/dotnet-api-docs#7285 (comment) into a new issue so we can discuss and track it:
|
Triage: If we have DNS client (with TTL) - #19443, we won't need this. edit by Cory: the full strategy we agreed to is in #60390 (comment). |
Even if we could get TTL info from DNS (and I'm skeptical we will be able to do this any time soon), the ability to "revalidate" a connection is still useful. With TTL info, we would know when a connection may have become invalid because the DNS info has changed. But just because the TTL has expired doesn't necessarily mean the DNS info has actually changed. Most of the time, it's the same, with an extended TTL. If we always just drop the connection when the DNS TTL expires, then we still suffer from this problem above:
So I think the ideal solution would be having TTL info + revalidation -- that is, when the TTL expires, we revalidate the DNS info exactly as described above. In the absence of TTL info, it seems like having the user provide something like |
The triage comment does not reflect this, but this is the agreement we came to during triage. |
DNS is not TCP. DNS TTL is not a reason to close a connection. If a server is not able to handle connection anymore it should close it. If it does not - it a bug of the server, not a client. "PooledConnectionLifetime workaround" is just a step in a wrong direction. |
Copying @geoffkizer 's idea from dotnet/dotnet-api-docs#7285 (comment) into a new issue so we can discuss and track it:
The text was updated successfully, but these errors were encountered: