7 ms·
TL;DR "Using IP Address Instead of Domain Name" Everything else remains pretty much the same...
by mcstafford 4y ago
TL;DR "Using IP Address Instead of Domain Name"
Everything else remains pretty much the same...
- Already__Taken 4y agoThat's kind of mad the udp host field always does a DNS lookup and ignores TTL though.
- ignoramous 4y ago> Everything else remains pretty much the same... Slightly worse, in that, the code only ever uses the first IP returned from the DNS lookups it initiates. Some domains may return 16 IPs but that code would use only the first, at least until the cached-entry expires.
- ldoughty 4y agoIf I recall correctly, that's how the Node maintainers want it in the core to... I was investigating errors in node code for a few weeks, and traced it to DNS returning a bad IP address. Node didn't even try to call the second IP address, it just returned a "request made but no response" error Looked deeper, and saw other similar complaints asking for nice to support failover and try the second IP, but it was highly opposed. They suggested writing your own DNS handling code (which is exactly what this person is doing, though for a different reason)
- hermanradtke 4y agoUsing an IP address will still call dns.lookup and waste an extra tick. The tl;dr is that you need to write your own lookup function.