-
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
Respect DNS TTL #23652
Comments
The tricky part here is retrieving the TTL. The standard DNS APIs on Windows/Linux don't seem to support this. On Windows there's DnsQueryEx, which seems to do what we want. On Linux, all I could find was some 3rd party DNS libraries, which is not ideal. Ideally, TTL would be exposed via standard managed DNS APIs like Dns.GetHostEntryAsync. It could be a new field on the IPHostEntry class. |
@wfurt Any suggestions on how to get this info on Linux? |
I don't. I look at some of the API and come to same conclusion. Using libresolv may be best we can get to. https://docs.oracle.com/cd/E36784_01/html/E36873/libresolv-3lib.html (libresolv.9.dylib on OSX) Since we are talking about expiring resolved name, we may also put some consideration to logic when multiple addresses are returned. I don't know what exactly we do but we may consider fallback if connect to one address fails as well as load-ballancing. Either one can have some implications. (so as preferring IPv6 over v4 (or vice versa) ) |
Since Dns doesn't provide the ability to get this data, and since PooledConnectionLifetime enables a similar goal, I'm going to close this for now. |
See #18348 for details on the issue
The text was updated successfully, but these errors were encountered: