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

Cleanup #97

Merged
merged 3 commits into from
Dec 11, 2023
Merged

Cleanup #97

merged 3 commits into from
Dec 11, 2023

Conversation

tempusfrangit
Copy link
Member

  • Eliminate global host resolution map - generally less fragile avoiding a global causing behavior changes.

    • Resolution overrides are now passed down in the client options.
  • Make the same fix made to consistent-hashing and move the .doRequest to within the go routine preventing blocking the main thread for no good reason.

Implement a struct that is attached to the transport for the dialcontext.
This struct contains the resolution override map. It is now expected
that commands will pass down the map as part of the Client Options.
Quick benchmark shows a 200-300MB/s increase on slower downloads
(e.g. from one provider to another) when not blocking the primary
execution block to make the request prior to downloading the chunk.
Copy link
Contributor

@philandstuff philandstuff left a comment

Choose a reason for hiding this comment

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

I'll push a commit for that one change and then merge

Comment on lines 141 to 143
if d.DNSOverrideMap == nil {
return d.Dialer.DialContext(ctx, network, addr)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@philandstuff philandstuff merged commit 4507be5 into main Dec 11, 2023
3 checks passed
@philandstuff philandstuff deleted the cleanup branch December 11, 2023 10:03
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.

2 participants