Skip to content

feat: Support custom DNS resolver#728

Draft
kdn36 wants to merge 1 commit into
apache:mainfrom
kdn36:feat_with_dns_resolver
Draft

feat: Support custom DNS resolver#728
kdn36 wants to merge 1 commit into
apache:mainfrom
kdn36:feat_with_dns_resolver

Conversation

@kdn36

@kdn36 kdn36 commented May 20, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Mitigates but does not close #726.

Rationale for this change

This PR enables users of object_store to provide a custom DNS resolver. Use case: the custom DNS resolver may have different properties (e.g., caching), and a different footprint (e.g., substantially smaller) than the default options.

What changes are included in this PR?

Enables override of the DNS resolver as used by the reqwest::HttpClient.

Are there any user-facing changes?

Yes. This PR adds ClientOptions::with_dns_resolver(Arc<dyn reqwest::dns::Resolve>).

@tustvold tustvold left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is probably fine, but generally we have tried to keep reqwest types out of our public API, especially in light of things like #724, and the fact we now support pluggable HTTP clients. The fact reqwest now has a resolve2 method, also doesn't really bode well for this API's stability longer-term 😅 It appears to have just been the legacy hyper API repackaged.

What do you think about defining our own resolve trait?

@alamb

alamb commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Can someone help me out -- is it possible to use a custom DNS resolver with a custom https://docs.rs/object_store/latest/object_store/client/trait.HttpConnector.html and wrapper around another client?

@alamb alamb marked this pull request as draft June 17, 2026 19:38
@alamb

alamb commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Marking as draft as I think this PR is no longer waiting on feedback and I am trying to make it easier to find PRs in need of review. Please mark it as ready for review when it is ready for another look

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.

Lightweight DNS cache with shuffle to prevent DNS flooding

3 participants