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

chore(dns) update dns client library #3220

Merged
merged 1 commit into from
Feb 26, 2018
Merged

chore(dns) update dns client library #3220

merged 1 commit into from
Feb 26, 2018

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Feb 13, 2018

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

@@ -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
Copy link
Contributor

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?

Copy link
Member Author

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)

Copy link
Member Author

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.

Copy link
Contributor

@hishamhm hishamhm Feb 26, 2018

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor

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!

@Tieske Tieske changed the base branch from master to next February 25, 2018 06:07
@Tieske
Copy link
Member Author

Tieske commented Feb 25, 2018

rebased it, now against next branch

@hishamhm
Copy link
Contributor

LGTM for next

@thibaultcha thibaultcha merged commit 78d21b2 into next Feb 26, 2018
@thibaultcha thibaultcha deleted the chore/dns-update branch February 26, 2018 21:46
Tieske added a commit that referenced this pull request Mar 14, 2018
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
thibaultcha pushed a commit that referenced this pull request Mar 20, 2018
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
thibaultcha pushed a commit that referenced this pull request Mar 20, 2018
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
Tieske added a commit that referenced this pull request Apr 3, 2018
Backport of #3220 to the 0.12.x version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants