-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Failover to other DNS nameservers #228
Comments
I'm assuming that consul is the primary nameserver and it allows 0+ secondary nameservers. It doesn't seem to allow the secondaries a chance to resolve hostnames. |
@drnic AFAIK the behavior of linux resolver is to failover to next nameservers defined in /etc/resolv.conf only if the previous one is timed out. Once a nameserver responds to the query (either with failure or success), the resolver process is over. |
This is odd indeed, since we didn't change the way DNS works at all between 0.2 and 0.3. The only changes were to optionally allow for TTL values or stale reads. Default behavior is unchanged. I agree with @salehe however, that the secondaries are only used if the first DNS server fails to respond. Relying on that behavior for DNS recursion is not the way to go. |
Closing, but please re-open if an issue. |
From what I was observing (v0.2.X), it seems that if I add consul agent as the first nameserver in
/etc/resolv.conf
and a hostname isn't resolved by consul, then it doesn't failover to the other nameservers [1] as other DNS nameservers have done for me in the past. Which chunk of consul code is doing this, and how should it fail nicely as a resolv nameserver if it cannot resolve a hostname (nor does its optional recursor chain)?[1] I know consul also supports a single explicit recursor
The text was updated successfully, but these errors were encountered: