Skip to content

RUST-483 Allow alternate DNS resolver configs #217

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

Merged

Conversation

patrickfreed
Copy link
Contributor

RUST-483

This PR allows users to resolve mongodb+srv connection strings using alternate DNS resolver configurations. This helps users avoid the known performance issue in trust-dns-resolver on Windows when using the system configuration (issue seen in RUST-467).

I opted to only include a helper on ClientOptions and not one on Client itself since this seemed like a very specific issue that was strictly configuration related.

@patrickfreed patrickfreed marked this pull request as ready for review July 22, 2020 16:21
Copy link
Contributor

@saghm saghm left a comment

Choose a reason for hiding this comment

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

LGTM! I agree with the decision to have it be specified as part of ClientOptions

Copy link
Contributor

@isabelatkinson isabelatkinson left a comment

Choose a reason for hiding this comment

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

small typo but otherwise looks good!

README.md Outdated
@@ -182,6 +184,21 @@ for result in cursor {

Currently, the driver has issues connecting to Atlas tiers above M2 unless the server version is at least 4.2. We're working on fixing this, but in the meantime, a workaround is to upgrade your cluster to 4.2. The driver has no known issues with either M0 or M2 instances.

## Windows DNS note

On Windows, there is a known issue in the `trust-dns-resolver` crate, which the driver uses to perform DNS lookups, that causes severe performance degradation in resolvers that use the system configuration. Since the driver uses the system configuration by default, users are recommended to specify an alternate resolver configuration on Windows until that issue is resolved. This is only has an effect when connecting to deployments using a `mongodb+srv` connection string.
Copy link
Contributor

Choose a reason for hiding this comment

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

there's an extraneous "is" at the beginning of the last sentence

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@patrickfreed patrickfreed merged commit 2e7ce91 into mongodb:master Jul 23, 2020
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.

3 participants