Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6640

Add custom DNS Resolver to Node Driver

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            aditi.khare@mongodb.com Aditi Khare
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: