Hi everyone!

The dns.resolve tries to send request to only the first nameserver 
in /etc/resolv.conf, and if the first nameserver fails to resolve the name, 
dns.resolve just returns and doesn't try to send request to the second 
nameserver.  Is this work-as-design?

Here is an example: the  /etc/resolv.conf is like below in Linux:
75.2.4.5
75.4.7.6

Run below codes:
*dns.resolve*('demo1.sample.com','A',function(err, addresses) {
        console.log(err);
        console.log(addresses);
});

The 'demo1.sample.com' is defined in the second nameserver (75.4.7.6), so 
the above codes always failed, because the dns.resolve doesn't try to call 
the second nameserver.

I found nodejs has flag to control this: 
https://github.com/nodejs/node/blob/master/deps/cares/src/ares_init.c#L255  
seems like the default behaviour is only call the first nameserver, is 
there any way to make dns.resolve to call all nameservers in 
/etc/resolv.conf until succeed? 

Thanks a lot.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/6b00be06-9aa3-4316-a031-fdd15e9d0725%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to