Add option to keep contact points unresolved and always re-resolve when there's total connectivity loss

Description

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.

Environment

None

Activity

Show:
Joao Reis
November 14, 2019, 11:57 AM

Unfortunately I can't find any information realated to caching on the microsoft documentation pages...

Jorge Bay Gondra
November 14, 2019, 11:58 AM
Joao Reis
November 14, 2019, 12:02 PM

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.

Joao Reis
November 14, 2019, 12:04 PM

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.

Joao Reis
November 14, 2019, 12:46 PM

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).

See https://stackoverflow.com/questions/17454925/does-net-respect-dns-ttl-values
Also see https://stackoverflow.com/questions/6928378/how-to-flush-cache-for-socket-gethostbyname-response for a similar problem in Python

Assignee

Unassigned

Reporter

Joao Reis

Labels

None

PM Priority

None

Fix versions

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

Pull Requests

None

Size

None

Priority

Major
Configure