Skip to content
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

Dynamic configuration of DNS server addresses #1016

Open
chunyingw opened this issue Feb 4, 2020 · 2 comments
Open

Dynamic configuration of DNS server addresses #1016

chunyingw opened this issue Feb 4, 2020 · 2 comments

Comments

@chunyingw
Copy link
Contributor

Ben,

Do we have a way to update the DNS server addresses for AsyncResolver at runtime ? Ex. for each query, it could use different DNS servers if no record is found in the cache.

My use case is that the resolver service could learn DNS server address from different sources such as DHCP client, NDP and default ones. So the DNS server addresses are updated dynamically.

I did a code search and did not find an obvious way to do that or I miss something?

@bluejekyll
Copy link
Member

No, we currently don't support this. I've wanted to do this, I think it will be needed for things like changing networks etc.

I don't currently have a design for it as I think it's a somewhat complex and possibly OS specific operation. My guess is that we want to have a high-level API that can be called to perform the update, and then each OS can have a wrapper that would update the connections via whatever mechanism it needs to implement...

@chunyingw
Copy link
Contributor Author

Thanks for the response, Ben.

As a temporary workaround for me, whenever the DNS name server address configuration update, a new AsyncResolver instance will be created. Meanwhile I may look into how to make dynamic configuration of DNS name servers work for trust-dns-resolver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants