In NodeJS DNS request are handled in the background via the ares library to enable asynchronous requesting. Ares allows the DNS server to be used set on a per channel bases, but this is not exposed in NodeJS, but is is quite simple to enable it by patching node_cares.cc. In essence this enables setting the DNS server via the parameter CHANNEL_NS on creation. To expose this towards NodeJS there needs to be an extension on the default dns.js module. The reason for me to enable this was to use different nameservers on each request, so the extension creates a new channel each time a new nameserver is needed.
I packed everything in a Github repository including some examples.