node-statsd icon indicating copy to clipboard operation
node-statsd copied to clipboard

Avoiding DNS Lookups for localhost on socket.send

Open dm03514 opened this issue 6 years ago • 0 comments

Greetings! I recently noticed that nodes udp library does a dns lookup on every socket.send call. It looks like newer versions of node allow callers to specify a custom lookup function on socket creation dgram.createSocket. But older versions don't.

Would it be possible to introduce a change to allow callers to specify a createSocket function as part of the statsd client arguments. This approach was taken in order to enable backwards compatibility with wayyy older versions of node (ie v0.10).

I appreciate your time!

danny

https://github.com/sivy/node-statsd/pull/76

dm03514 avatar Oct 11 '19 16:10 dm03514