Enhancement of IPv6 Connectivity and Address Selection in High Latency Networks
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 880
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 68
Description
This would solve...
The current challenge faced by users in regions with high latency or unreliable IPv6 connectivity, which can lead to timeouts and connection issues when Undici attempts to connect to a server that resolves to an IPv6 address. This problem is particularly acute when the DNS resolution prioritises an AAAA record over an A record, leading to failed connection attempts even when an IPv4 route is available and potentially more reliable.
The implementation should look like...
An improved mechanism within Undici that intelligently selects the network address family (IPv4 or IPv6) based on network performance metrics or user-defined preferences. This could involve implementing a pre-connection check that assesses the latency or reliability of the IPv6 route and, if it fails to meet a certain threshold, falls back to IPv4 before attempting the connection. Additionally, this feature could be configurable, allowing users to set their own preferences for address family selection based on their network environment.
I have also considered...
As an alternative, a user-configurable option could be provided to force Undici to use IPv4 addresses only, bypassing IPv6 altogether. However, this approach may not be ideal as it does not leverage the potential benefits of IPv6 where it is available and reliable. Another consideration is to improve the documentation to guide users on how to handle such scenarios, including the use of the autoSelectFamily option available in Node.js versions 18.3.0 and above.
Additional context
This enhancement would not only improve the robustness of Undici in diverse network environments but also ensure better compliance with modern standards that encourage the use of IPv6. It would be beneficial to gather data from users experiencing these issues to better understand the conditions under which IPv6 connections fail and use this data to inform the development of the feature. Additionally, community feedback on the proposed solutions would be invaluable in shaping an approach that addresses the needs of a wide range of users.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Node.js's autoSelectFamily option and Undici's existing connection and address-selection entry points. The issue does not name files or tests; first define the selection criteria, configuration behavior, fallback semantics, and measurable completion conditions before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100