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

Using c-ares-backed DNS resolution #3

Merged
merged 6 commits into from
Mar 7, 2012
Merged

Conversation

ntoshev
Copy link
Contributor

@ntoshev ntoshev commented Mar 6, 2012

I encountered some problems when trying to do many simultaneous http requests because the default DNS resolution in node.js uses getaddrinfo(3) syscall in a thread pool. I switched to c-ares backed dns resolution and this solves two problems:

  1. it's faster
  2. using DNS with high levels of parallelism is slowing down disk I/O too, see http://groups.google.com/group/nodejs/browse_thread/thread/6f564ac1dcd650bf

Hope you are willing to add it to the library because this is the proper way to handle it.

@ntoshev
Copy link
Contributor Author

ntoshev commented Mar 7, 2012

Also added support for timeouts and passing through agent parameter to http.request

andris9 added a commit that referenced this pull request Mar 7, 2012
Using c-ares-backed DNS resolution
@andris9 andris9 merged commit 7990923 into andris9:master Mar 7, 2012
@andris9
Copy link
Owner

andris9 commented Mar 7, 2012

Thanks!

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