dns.resolve()、dns.resolve*() 与 dns.reverse()


这些功能实现与dns.lookup()截然不同。它们不仅没有使用getaddrinfo(3)并且通过网络执行DNS查询。使用异步网络通信,并且没有使用libuv线程池。

因此,这些函数不会像使用libuv线程池的dns.lookup()函数一样会对其它进程有负面影响。

它们不像dns.lookup()一样使用相同的配置文件。例如,它们不会使用来自/etc/hosts配置。

These functions are implemented quite differently than dns.lookup(). They do not use getaddrinfo(3) and they always perform a DNS query on the network. This network communication is always done asynchronously, and does not use libuv's threadpool.

As a result, these functions cannot have the same negative impact on other processing that happens on libuv's threadpool that dns.lookup() can have.

They do not use the same set of configuration files than what dns.lookup() uses. For instance, they do not use the configuration from /etc/hosts.