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

Implement fallback to IPv4/IPv6 vice-versa

    • Not Needed
    • 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?

      Use Case

      As a Node.js Driver user
      I want the driver to attempt to use all A and AAAA records for each hostname
      So that the driver automatically handles connecting to exclusively IPv4 or exclusively IPv6 bound servers without needing configuration changes.

      User Impact

      • Users will be able to connect to servers bound to IPv4 or 6 or both addresses
      • Driver will prefer IPv6 addresses

      Dependencies

      • The driver will own DNS lookup steps prior to socket creation

      Unknowns

      • How does this impact unix socket usage? Does a driver continue to use unix sockets?
      • Should connectTimeoutMS and/or CSOT control how long we wait for DNS to resolve?
      • What logging if any should be included before/after lookup?

      Acceptance Criteria

      Implementation Requirements

      • Hostnames should be resolved to AAAA and A records
      • The driver should prefer connecting to IPv6 addresses, but attempt all

      Testing Requirements

      • Remove all DNS resolution order settings
      • Ensure that localhost resolving to ipv6 and v4 work (can use sinon for this)

      Documentation Requirements

      • Remove note about handling for IPv4/6 from readme

      Follow Up Requirements

      • None.

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: