Skip to content

Add a lookup option to allow users to implement their own DNS resolution #315

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hujiulong
Copy link

Fix #314.

Users can provide a lookup option to replace Node.js's internal default synchronous DNS resolution, significantly improving performance in cases where DNS resolution might time out.

The dns.resolve() methods are asynchronous but behave slightly differently from the default dns.lookup(). For example, dns.resolve() does not follow the local hosts file. Considering these behavioral differences, an option is provided for users to pass in, rather than modifying it internally.

Reference Information: #314 and Nodejs DNS docs

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.

Synchronous DNS resolution affects the performance of this library
1 participant