node/doc/api
Ruben Bridgewater 1c12dd6347
dgram: skip dns.lookup() for literal IP addresses
Every unconnected send(), and the implicit bind on first send,
resolved the destination through dns.lookup() even when it was
already a literal IP. The address resolves to itself, so the call is
redundant, and tools that instrument dns.lookup() record a lookup for
every datagram sent to an IP.

Skip the resolver for a literal IP of the socket's family and report
it on the next tick, keeping dns.lookup()'s asynchronous contract. A
custom lookup function is still consulted for every address.

Refs: https://github.com/DataDog/dd-trace-js/issues/2984
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/64133
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-06-30 13:07:49 +00:00
..
addons.md src: officially deprecate node::ObjectWrap 2026-06-13 23:12:14 +00:00
assert.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
async_context.md 2026-05-07, Version 26.1.0 (Current) 2026-05-07 12:01:50 +02:00
async_hooks.md
buffer.md 2026-06-23, Version 24.18.0 'Krypton' (LTS) 2026-06-23 22:59:09 +00:00
child_process.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
cli.md esm: add --experimental-import-text flag 2026-06-26 13:50:21 +00:00
cluster.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
console.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
crypto.md 2026-06-23, Version 24.18.0 'Krypton' (LTS) 2026-06-23 22:59:09 +00:00
debugger.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
deprecations.md 2026-06-23, Version 24.18.0 'Krypton' (LTS) 2026-06-23 22:59:09 +00:00
dgram.md dgram: skip dns.lookup() for literal IP addresses 2026-06-30 13:07:49 +00:00
diagnostics_channel.md diagnostics_channel: return original thenable 2026-06-26 10:02:49 +00:00
dns.md doc: fix a/an article typos in module, util, and dns 2026-06-08 14:42:21 +00:00
documentation.md
domain.md
dtls.md src, lib: add stats to dtls 2026-05-21 14:13:05 -07:00
embedding.md
environment_variables.md
errors.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
esm.md esm: add --experimental-import-text flag 2026-06-26 13:50:21 +00:00
events.md
ffi.md ffi: add experimental fast FFI call API for AArch64 and x86_64 2026-06-16 09:35:02 +00:00
fs.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
globals.md 2026-05-05, Version 26.0.0 (Current) 2026-05-05 11:17:12 -03:00
http.md doc: fix broken links and duplicate stability label 2026-06-27 14:10:05 +00:00
http2.md doc: update Http2Server.close & Http2SecureServer.close 2026-06-29 08:48:48 +00:00
https.md crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183) 2026-06-19 18:03:51 +02:00
index.md vfs: add minimal node:vfs subsystem 2026-05-23 18:43:31 +00:00
inspector.md inspector: fix inspector.close() documented behavior 2026-06-20 04:04:20 +00:00
intl.md
module.md doc: fix a/an article typos in module, util, and dns 2026-06-08 14:42:21 +00:00
modules.md doc: fix broken links and duplicate stability label 2026-06-27 14:10:05 +00:00
n-api.md 2026-06-23, Version 24.18.0 'Krypton' (LTS) 2026-06-23 22:59:09 +00:00
net.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
os.md doc: remove unnecessary <!-- eslint- magic comments 2026-05-10 15:06:35 +00:00
packages.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
path.md
perf_hooks.md perf_hooks: sample delay per event loop iteration 2026-06-24 23:50:06 +00:00
permissions.md lib,permission: add permission.drop 2026-05-26 13:40:14 +00:00
process.md 2026-06-01, Version 26.3.0 (Current) 2026-06-01 15:01:03 +02:00
punycode.md
querystring.md
quic.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
readline.md
repl.md 2026-05-07, Version 26.1.0 (Current) 2026-05-07 12:01:50 +02:00
report.md
single-executable-applications.md doc: clarify SEA platform support excludes darwin-x64 2026-05-10 07:38:57 +00:00
sqlite.md doc: clarify filter option of sqlite.database.applyChangeset 2026-05-26 13:41:13 +00:00
stream.md doc: fix broken links and duplicate stability label 2026-06-27 14:10:05 +00:00
stream_iter.md stream: refine the stream/iter backpressure 2026-06-17 16:08:46 +00:00
string_decoder.md
synopsis.md
test.md doc: fix incorrect test runner mock examples 2026-06-17 09:11:36 +00:00
timers.md
tls.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
tracing.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
tty.md doc: clarify tty raw mode applies to input processing only 2026-06-02 22:57:15 +00:00
typescript.md 2026-05-05, Version 26.0.0 (Current) 2026-05-05 11:17:12 -03:00
url.md
util.md doc: fix typo in util.md 2026-06-20 16:14:30 +09:00
v8.md lib: insert argv[0] at argv[1] in setDeserializeMainFunction 2026-06-10 11:36:03 +09:00
vfs.md doc: clarify vfs is not a sandbox 2026-06-28 10:11:44 +00:00
vm.md doc: fix typo in vm.md 2026-06-12 21:45:48 +00:00
wasi.md doc: fix inconsistencies in CJS code snippets 2026-05-10 14:16:15 +00:00
webcrypto.md 2026-06-24, Version 26.4.0 (Current) 2026-06-25 01:20:15 +02:00
webstreams.md
worker_threads.md doc: add worker_threads history entries 2026-06-02 16:40:38 +02:00
zlib.md zlib: expose rejectGarbageAfterEnd option 2026-06-27 11:22:32 +00:00