-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
First implementation for DRIVERS-2757.
Use Case
As a... Node.js driver user
I want... DNS lookup failures to be retried automatically on the driver side
So that... I don't have to build retry logic into my application
User Experience
- Less frequent connection failure errors
Dependencies
- None
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- Which actual errors should we retry? Only transient ones or all?
- https://nodejs.org/api/dns.html#error-codes
- Check to find out what the error codes mean
- Only TIMEOUT, all other errors indicate something that is unrecoverable
- Is there an opportunity to improve existing documentation on this subject?
- Users experience the DNS error at the call site for client.connect() so we'll update the API docs there. And there will be release notes for this.
Acceptance Criteria
Implementation Requirements
- Retry the initial srv txt lookups once on failure: TIMEOUT
Testing Requirements
- Use the dns seedlist spec prose test SRV records to hit a real DNS record and use sinon to fake timeout errors.
- Note: try to write the testing in a way that is potentially adaptable as a general drivers prose test. If drivers have a DNS stubbing system they can do this, otherwise, this isn't something that can be made common easily.
Documentation Requirements
- Update client.connect() API doc.
Follow Up Requirements
- N/A, DRIVERS-2757 is the follow up
- is depended on by
-
DRIVERS-2757 Retry on DNS failure
-
- Backlog
-
- is related to
-
NODE-6129 Retry on DNS failure
-
- Blocked
-