-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
chore(dns) update dns client library #3220
Conversation
@@ -703,7 +703,8 @@ local function execute(target) | |||
hostname = target.host | |||
if not ip then | |||
log(ERR, "[dns] ", port, ". Tried: ", tostring(try_list)) | |||
if port == "dns server error: 3 name error" then | |||
if port == "dns server error: 3 name error" or | |||
port == "dns client error: 101 empty record received" then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tieske A question, as I try to understand the relationship between lua-resty-dns-client and kong.core.balancer better: is there any other error (matching "dns .* error"
) returned in port
that should not result in a name resolution failed
error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not if everything works as expected. But it could probably return db errors as well if a lookup for an upstream fails for some reason.
So these are the specific ones we catch to generate a 503. Others will be 500. (Top of mind answer, on mobile)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't read your question properly.
So these two errors listed in this change, are the only two where everything works as it should, yet we could not resolve.
So for example a dns server error is now reported as a 500.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So these two errors listed in this change, are the only two where everything works as it should, yet we could not resolve.
To check that I follow: this means that these are the cases where communication with Kong and the DNS server went well, but the name could not be resolved (because, for example, the name doesn't exist), and the other ones are cases include things like "DNS server is down", "DNS server replied badly formatted message" (these two being 'their' fault), "we couldn't open a socket" (this one being 'our' fault), etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thank you for the clarification!
6a46779
to
a47b757
Compare
rebased it, now against |
LGTM for |
The original size was way to low to guarantee proper random distribution beyond 3-4 targets. The recommended size is 100 slots per target. The new default covers up to 100 targets. The approximate footprint per upstream: - 65535 slots, 100 targets: 1.6MB - 10000 slots, 100 targets: 375kB This fix should have been included in the latest update of the DNS library dependency. Related #3220
The original size was way to low to guarantee proper random distribution beyond 3-4 targets. The recommended size is 100 slots per target. The new default covers up to 100 targets. The approximate footprint per Upstream: - 65535 slots, 100 targets: 1.6MB - 10000 slots, 100 targets: 375kB This fix should have been included in the latest update of the DNS library dependency. Related #3220 From #3296
The original size was way to low to guarantee proper random distribution beyond 3-4 targets. The recommended size is 100 slots per target. The new default covers up to 100 targets. The approximate footprint per Upstream: - 65535 slots, 100 targets: 1.6MB - 10000 slots, 100 targets: 375kB This fix should have been included in the latest update of the DNS library dependency. Related #3220 From #3296
Backport of #3220 to the 0.12.x version
Update the dns client to 2.0, to fix several issues. For details see https://github.com/Kong/lua-resty-dns-client/blob/master/README.md#history
closes #3210