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

feat(iroh-net): small improvements to dns behaviour #2290

Conversation

divagant-martian
Copy link
Contributor

@divagant-martian divagant-martian commented May 14, 2024

Description

Closes #2277

  • According to the issue, we do sequencial queries with a relatively high
    timeout. However, from a quick check of hickory's docs, the default is a
    number of concurrent requests of 2. In summary, this was never actually an
    issue. To ensure we keep this behaviour even if the default changes, set the
    number of concurrent requests to 3.. just to gives us more room.
  • It also reduces the timeout for lookups to make it smaller than netcheck's.
  • Change confusing comment that stated we configure Ipv4 AND Ipv6 when we
    actually avoid it.

Breaking Changes

n/a

Notes & open questions

From reading hickory's code and adding there some dirty log statements, this is
(and was) working as intended.

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@divagant-martian divagant-martian added this to the v0.17.0 milestone May 14, 2024
@divagant-martian divagant-martian self-assigned this May 14, 2024
@flub

This comment was marked as outdated.

Comment on lines +70 to +71
// ensure multiple name servers are queried concurrently
options.num_concurrent_reqs = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, only just realised this comment. It queries multiple DNS servers concurrently, but we typically only have a single DNS server. We want (I think) to be robust in case the UDP packet to this server is lost and thus do multiple concurrent requests to the same server, but with staggered starts so that you don't always pay the price of the multiple requests if your DNS server is fast enough.

@flub
Copy link
Contributor

flub commented May 14, 2024

Maybe this PR could also attempt removing the flaky label of the windows DNS tests? See #2086

@divagant-martian
Copy link
Contributor Author

Closing this to tackle it in a fresh one

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

Successfully merging this pull request may close these issues.

Improve DNS lookup behaviour
2 participants