- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33.7k
 
Open
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 that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
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 ttl option 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-callback
Something like dns.resolve('...', { ttl: 100 }, () => {}); or new dns.Resolver({ ttl: 100 });
What alternatives have you considered?
No response
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 that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Projects
Status
Awaiting Triage