-
-
Notifications
You must be signed in to change notification settings - Fork 37.1k
Implement DNS querying cache management API #57641
Copy link
Copy link
Closed as not planned
Labels
caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.Issues and PRs related to the c-ares dependency or the cares_wrap binding.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
Description
Activity
Metadata
Metadata
Assignees
Labels
caresIssues and PRs related to the c-ares dependency or the cares_wrap binding.Issues and PRs related to the c-ares dependency or the cares_wrap binding.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
Type
Projects
- StatusShow more project fieldsAwaiting Triage
What is the problem this feature will solve?
Follow up to #57640 , we should create an API that allows users to specify the DNS querying cache TTL.
With the addition of this API, we should restore the default behavior to match the (sensible) defaults of c-ares (i.e. remove the qcache_max_ttl=0`).
I will contribute this in the coming days.
What is the feature you are proposing to solve the problem?
API I have in my head is to add a
ttloption to https://nodejs.org/api/dns.html#resolveroptions and to all of the shortcuts too i.e. https://nodejs.org/api/dns.html#dnsresolvehostname-rrtype-callbackSomething like
dns.resolve('...', { ttl: 100 }, () => {});ornew dns.Resolver({ ttl: 100 });What alternatives have you considered?
No response