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)!: improve dns behaviour by staggering requests #2313

Merged

Conversation

divagant-martian
Copy link
Contributor

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

Description

Improves dns behaviour by staggering concurrent queries. Other changes include:

  • Remove unnecessary trait bounds from ResolverExt functions.
  • Unify dns capabilities under ResolverExt.
  • Add helper fn stagger_call with a minimal test.
  • Add staggering versions of the ResolverExt functions.
  • Use staggered options and turn on tests

Breaking Changes

  • iroh_net::dns::node_info::lookup_by_domain moved to iroh_net::ResolverExt::lookup_by_domain

Notes & open questions

Whether test are less prone to fail randomly is something I can't test locally (no windows) so I'm trusting ci here.

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 20, 2024
@divagant-martian divagant-martian self-assigned this May 20, 2024
@divagant-martian divagant-martian linked an issue May 20, 2024 that may be closed by this pull request
@divagant-martian divagant-martian changed the title feat(iroh-net): improve dns behaviour by staggering requests feat(iroh-net)!: improve dns behaviour by staggering requests May 20, 2024
Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

All the code looks good, basically I'm mostly bikeshedding nothing I want to block things for as it's subjective anyway.

iroh-net/src/dns.rs Outdated Show resolved Hide resolved
iroh-net/src/dns.rs Outdated Show resolved Hide resolved
iroh-net/src/dns.rs Outdated Show resolved Hide resolved
iroh-net/src/dns/node_info.rs Outdated Show resolved Hide resolved
iroh-net/src/netcheck/reportgen.rs Show resolved Hide resolved
iroh-net/src/netcheck/reportgen.rs Show resolved Hide resolved
Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

Nice, I think the trait method names are now nicely consistent. And their first lines of the doc comments descriptive.

iroh-net/src/dns.rs Outdated Show resolved Hide resolved
@divagant-martian divagant-martian added this pull request to the merge queue May 22, 2024
Merged via the queue into n0-computer:main with commit d813089 May 22, 2024
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve DNS lookup behaviour
3 participants