Uh oh!
There was an error while loading. Please reload this page.
Temporarily increase network_family_autoselection_attempt_timeout to 500ms - #56738
Temporarily increase network_family_autoselection_attempt_timeout to 500ms#56738hvanness wants to merge 1 commit into
Conversation
nodejs-github-bot
commented
Jan 24, 2025
Review requested:
|
hvanness
commented
Jan 24, 2025
Please add notable-change label. |
mcollina
commented
Jan 24, 2025
Can you articulate why we should be doubling this? The other discussion is very long. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #56738 +/- ##
==========================================
- Coverage 89.22% 89.21% -0.02%
==========================================
Files 663 663 Lines 191974 192012 +38 Branches 36926 36933 +7 ==========================================
+ Hits 171286 171294 +8 - Misses 13561 13575 +14 - Partials 7127 7143 +16
🚀 New features to boost your workflow:
|
ShogunPanda
commented
Jan 24, 2025
@hvanness Can you please update failing tests? Once you do that, this PR will LGTM. |
9de2507 to
f527634Comparehvanness
commented
Jan 28, 2025
This is a socket connection hard timeout, which should eventually be removed from the implementation. For now, increasing it to 500ms resolves the majority of breaking cases: PS. I maintain that parallel connections are equally safe as serial. If it is possible to stop a connection to make it serial, then it must be possible to stop all connections when one parallel connection is established. |
ShogunPanda
commented
Jan 28, 2025
Unfortunately that's not the case. Sockets are created at C++ layer and linked to JS objects. The code is structured to have one C++ socket per JS socket and having multiple would impact significant refactoring in the code, especially w.r.t. callbacks established in many other places of the code (like TLS). |
b82a398 to
e26919cCompare…500ms The timeout currently closes the connection instead of supporting parallel connections. This should be reset to 250ms if parallel connections are implemented as per RFC 8305.
e26919c to
92e1aaaCompareMobinAskari
commented
Apr 8, 2025
Temporarily? |
ShogunPanda
commented
Apr 8, 2025
My problem with this PR is that while increasing the timeout is semver-minor, decreasing would be semver-major (unless we opt to revert the change, which is not always a good idea). I'll bring this into the next TSC to get a line of action. |
BridgeAR
left a comment
There was a problem hiding this comment.
The increase itself is LGTM. Thanks for the PR! We just need to document the change in the changes section, so that users know about it.
Similar to e.g., https://github.com/nodejs/node/pull/56738/files#diff-d76469e9e7f555294a7a5488c5c8fc4ef8ce5aea448cc26a1322d1ab693e09caL1713-L1724
Please also change the commit message to adhere to our commit message guidelines as outlined in the pull request contributing document :)
It should actually not be a temporary increase. We likely stick with this until we find a completely different solution.
I didn't check if anything else has to be changed here.
richardlau
commented
Apr 9, 2025
Applied the |
ShogunPanda
commented
Apr 19, 2025
@hvanness If you fix the commit we will be happy to land this. |
cgrayson
commented
Jun 30, 2025
@hvanness did you plan to make the requested change to this commit so they could land it? |
mcollina
commented
Jul 2, 2025
Can you adjust the first commit to follow our guidelines? |
This pull request has been marked as stale due to 210 days of inactivity. |
CrazyWolf13
commented
Jun 5, 2026
@hvanness are there any intentions to continue this? I'm facing similar issues and would love to see this merged, thanks! |
…yeballs 250ms budget) (#381) Node >=20 enables autoSelectFamily with a 250ms per-address connect budget. On links whose TCP connect to the identity provider exceeds it (VPNs, deployments far from Microsoft endpoints), every outbound connection attempt is aborted: jwks-rsa cannot download signing keys and the API rejects ALL valid tokens with an empty 401 — intermittently, since real-world latency fluctuates around the threshold. The same budget governs the http/https agents used by the storage SDKs. Known upstream issue (nodejs/node#54359). Node 25.2 raised the default to 500ms (nodejs/node#60334), still tight for high-RTT links and not backported to 24 LTS, so set the 2500ms value originally proposed upstream (nodejs/node#56738) at bootstrap. Connections that finish faster are unaffected; only failover to dead addresses gets slower.
The timeout currently closes the connection instead of supporting parallel connections. This should be reset to 250ms if parallel connections are implemented as per RFC 8305.
This PR was initiated in this discussion, where @ShogunPanda suggested 300ms - 500ms timeout.