-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Currently, all MongoClients use the same DNS Resolver (dns.promises.resolveSRV). that uses a thread pool across operations, so cancelling one operation could affect other clients
For client.close work, we'd want to cancel an in-progress DNS resolution upon close. A proposed solution for this is to in order to abort an in-progress is to create a custom DNS Resolver for the Node Driver that safely takes in an AbortController
Risks/Unknowns
- What is the impact of switching out of the dns.promises.resolve / using its thread pool?
- Specifically what is unique to each resolver - what are the impacts of each client having its own resource-wise? (multiple threadpools?)
- What are the specifics of our custom DNS resolver design? Should it also run in the background?
Acceptance Criteria
Implementation Requirements
- Implement a custom DNS Resolver and no longer use dns.promises.resolve
- Pass in an abort controller that fires on close to the custom dns resolutions
Testing Requirements
- Assert that an in-progress SRV resolution aborts when client.close() is awaited
- related to
-
NODE-6601 Expose pluggable interface for I/O functions
- Backlog