Tech Breakthrough: Streamlining Statsd with Smart DNS Skipping!
Ingenious new updates eliminate unnecessary lookups, enhancing performance and efficiency in Node applications!
Commit Details:
chore: Skip DNS lookups for IP addresses in statsd module (#1960) ## Motivation Node's default behavior results in a lot of unnecessary DNS lookups being made for the loopback IP address. Skip it. ## Change Summary Don't do a DNS lookup when the host is an IP. ## Merge Checklist - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. - [x] All [commits have been signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits) <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on optimizing statsd calls by stopping DNS lookups for loopback addresses in the shuttle package. ### Detailed summary - Updated `statsd.ts` in `shuttle` package - Added explicit host configuration to avoid deprecation warning - Implemented custom DNS lookup function to bypass lookup for IP addresses > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->