nodejs / nodejs/node

Implement parallel Happy Eyeballs as described in RFC 8305

未关闭
#48,145 16 条评论 13 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature request net never-stale
主要语言
JavaScript
星标
122k
派生
37.4k
平均合并
4 天 3 小时
30 天内合并 PR
272

描述

What is the problem this feature will solve?

autoSelectFamily is enabled by default in Node.js 20. However, it does not properly implement parallel connection attempts, which are an integral part of the Happy Eyeballs algorithm. This can cause timeouts to occur that did not occur in versions prior to Node.js 20. See, for example, this discussion.

What is the feature you are proposing to solve the problem?

Implement the algorithm as described in Section 5 of RFC 8305:

Starting a new connection attempt does not affect previous attempts, as multiple connection attempts may occur in parallel.

What alternatives have you considered?

Disabling autoSelectFamily and restoring the pre-20 behavior, see https://github.com/nodejs/node/issues/47644#issuecomment-1554440759.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 RFC 8305 的 Section 5 开始,将其中关于并行连接尝试的要求与 Node.js 当前的 autoSelectFamily 行为进行比较。使用链接的讨论以及 issue 中引用的 pre-20 行为来了解这次回归;当连接尝试可以并行进行且不影响更早的尝试,并且报告的 timeout 行为得到处理时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, nodejs
领域
networking
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。