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

resolver: dns resolver does not allow to set the lookup frequency #2279

Closed
davidklassen opened this issue Aug 30, 2018 · 4 comments
Closed

Comments

@davidklassen
Copy link

davidklassen commented Aug 30, 2018

It would be nice to have an option for the resolver builder to set the lookup frequency.
This can be useful when we are balancing grpc client connections in autoscaled environments.
Right now the default freq is set to 30 minutes (https://github.com/grpc/grpc-go/blob/master/resolver/dns/dns_resolver.go#L47) and there is no way to configure this value.

@menghanl
Copy link
Contributor

This has been discussed in #1663, and the decision is to not add a custom polling frequency.
Please take a look at that and see if it answers your question.

@dfawley
Copy link
Member

dfawley commented Aug 30, 2018

From #1663, your options here are to set max connection age or make a custom resolver that behaves the way you like. Note that the default DNS resolver will be changed soon to not poll at all.

@dfawley dfawley closed this as completed Aug 30, 2018
@bwplotka
Copy link

bwplotka commented Nov 29, 2018

Note that the default DNS resolver will be changed soon to not poll at all.

@dfawley Can you give more info about this one?

@dfawley
Copy link
Member

dfawley commented Nov 29, 2018

gRPC in Java and C do not poll DNS; they only update when connection errors happen. We already update when connection errors happen, but we need to implement something to keep retrying if no addresses are returned. Once that happens, we will remove polling from our DNS resolver.

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

Successfully merging a pull request may close this issue.

4 participants