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(deps) Update dns dependency and options #2625

Merged
merged 1 commit into from
Jun 20, 2017
Merged

chore(deps) Update dns dependency and options #2625

merged 1 commit into from
Jun 20, 2017

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Jun 15, 2017

updates the dns lib to 0.6.0, adds the new dns_stale_ttl option.

Copy link
Member

@thibaultcha thibaultcha left a comment

Choose a reason for hiding this comment

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

It feels like we are adding a lot of configuration values that maybe feel overkill? Is there really a common use case for each one of these 5 new values, and can't a few of them be either grouped together, or be hard coded with sane values?

I expect the answer to be no for the sake of giving the user as many choices as possible (or defer responsibility to him/her), but damn, I don't remember the Nginx resolver needing that many configuration properties...

# request will trigger its own dns query.
# When disabled multiple requests for the
# same name/type will be synchronised to a
# single query.
Copy link
Member

Choose a reason for hiding this comment

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

As a user, what's the benefit I get from tweaking that setting? What's the trade-off between one or multiple queries?

Or, is this new behavior not yet production tested and this value is to ensure that if something goes wrong, the user can revert back to the original behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

This setting I'd love to get rid of, but it is the one that enables a query per request. (if combined with dns_stale_ttl = 0 and record ttl being 0 as well). I left the description intentionally like this, to motivate people to not use it unless instructed to.

Copy link
Member

Choose a reason for hiding this comment

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

What I am curious about is, why would I be instructed to change this default - as in, under which circumstances? Since it seems to be the default is the most sane value and I see little (no) value in the old behavior compared to this new one (except, as mentioned, reverting to stability if something goes wrong).

order = conf.dns_order, -- order of trying record types
noSynchronisation = conf.dns_no_sync
Copy link
Member

Choose a reason for hiding this comment

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

We had a trailing comma in the previous line, and it's great since the diff was easy to read here. However, no trailing comma here 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

# record types. The `LAST` type means the
# type of the last successful lookup (for the
# specified name). The format is a (case
# insensitive) comma separated list.

#dns_stale_ttl = 4.0 # Once a record expires, how much longer (in
Copy link
Member

Choose a reason for hiding this comment

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

When a value's unit of time is in seconds, I think it makes it simpler for the user if we avoid the fractional part in the defaults. It makes things unnecessary complicated.

Copy link
Member Author

Choose a reason for hiding this comment

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

the intent is to show that fractional part are accepted and valid. As with the other similar values.

Copy link
Member

@thibaultcha thibaultcha Jun 16, 2017

Choose a reason for hiding this comment

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

Yes, that was clearly the intent, but it feels unnecessarily cumber-stone, that's all.

# So stale data will be used from expiry of a
# record until either the refresh query
# completes, or the `dns_stale_ttl` number of
# seconds have passed.
Copy link
Member

Choose a reason for hiding this comment

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

This sentence reads weird because it starts with "So", which feels colloquial.

Stale records will still be returned when they expired,
until the refresh query completes, or the `dns_stale_ttl`
number of seconds have passed. 

@Tieske
Copy link
Member Author

Tieske commented Jun 16, 2017

It feels like we are adding a lot of configuration values that maybe feel overkill? Is there really a common use case for each one of these 5 new values, and can't a few of them be either grouped together, or be hard coded with sane values?

Considering the amount of issues we've had, I'd like to stick to them for now. Except for the dns_no_sync one, which has only one sane setting which is the current default.

@Tieske Tieske force-pushed the update-dns branch 2 times, most recently from 0563258 to 4217b7c Compare June 16, 2017 15:07
@thibaultcha
Copy link
Member

Considering the amount of issues we've had, I'd like to stick to them for now. Except for the dns_no_sync one, which has only one sane setting which is the current default.

Sounds good, let's postpone this to the incoming revamp/cleanup of the config file then.

@Tieske Tieske force-pushed the update-dns branch 2 times, most recently from 7b36454 to 92a83ec Compare June 19, 2017 09:55
@Tieske Tieske mentioned this pull request Jun 19, 2017
updates the dns lib to 0.6.0, adds the new `dns_stale_ttl` and
`dns_no_sync` options.
@thibaultcha thibaultcha added pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release) and removed pr/status/please review labels Jun 19, 2017
@thibaultcha
Copy link
Member

@Tieske LGTM, but if you want proper CI testing, you'll need to purge the cache on Travis which uses lua-resty-dns-client 0.5 from prior builds.

@Tieske Tieske added this to the 0.11.0 milestone Jun 20, 2017
@thibaultcha thibaultcha merged commit b43fda1 into next Jun 20, 2017
@thibaultcha
Copy link
Member

Merged without the title case "Update". Thanks!

@thibaultcha thibaultcha deleted the update-dns branch June 20, 2017 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/ready (but hold merge) No more concerns, but do not merge yet (probably a conflict of interest with another PR or release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants