In some cases, it might be useful to store contact points as unresolved (hosts with dynamic addresses like with k8s). We should have a config method on the builder to force the driver to resolve the contact point everytime it is used in the attempt to open/re-open the control connection.
Similar to this, we should use this mechanism when total connectivity is lost without considering what value is set in this new config option.
Note: See and for further context.
Unfortunately I can't find any information realated to caching on the microsoft documentation pages...
Hmm interesting, I'll add that to the description and do some tests with it when I pick this up. That isn't available in net standard 1.5 but we are going to drop support for it anyway.
The thing that worries me with that class is that it applies to the entire application so I'll try changing that setting just before the query and resetting it to the original value afterwards I guess.
I read some more documentation and it looks like this is completely dependent on the underlying OS since the DNS class just invokes the OS DNS subsystem. Maybe it's fine to keep using Dns.GetHostEntry (also looks like the ServicePointManager is only used for HTTP requests).
Also see https://stackoverflow.com/questions/6928378/how-to-flush-cache-for-socket-gethostbyname-response for a similar problem in Python