shared/tls: implement Happy Eyeballs (RFC 8305) in RFC3493Dialer#2753
Merged
shared/tls: implement Happy Eyeballs (RFC 8305) in RFC3493Dialer#2753
Conversation
Member
|
Looks like your commit is missing the In general, I'm fine with happy eyeballs, though I remember us looking into this a while back and then not pursuing it so I'll want to refresh my memory for whether there was a strong technical reason to avoid it. |
Contributor
Author
|
Thanks @stgraber - I've added the signed-off-by line now as requested. |
stgraber
reviewed
Dec 16, 2025
61cca53 to
dbc2b9a
Compare
The RFC3493Dialer function, before this, tried addresses sequentially with a 10-second timeout per address. This causes problems in dual-stack environments where one address family is unreachable: - If DNS returns IPv4 addresses first but IPv4 is unreachable (e.g., in IPv6-only environments), the dialer would spend 10+ seconds timing out on each IPv4 address before trying IPv6. - This exceeded typical HTTP client timeouts, causing connection failures even when IPv6 connectivity was available. This change implements Happy Eyeballs (RFC 8305): 1. Sort addresses with IPv6 first (RFC 8305 recommends preferring IPv6) 2. Start connection attempts with a 250ms staggered delay (per RFC 8305) 3. Return the first successful connection immediately 4. Finally clean up unused connections Signed-off-by: John Axel Eriksson <[email protected]>
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The RFC3493Dialer function, before this, tried addresses sequentially with a 10-second timeout per address. This causes problems in dual-stack environments where one address family is unreachable:
For example, cluster-api-provider-incus would end up with
Context Deadline Exceededsince it seems to have a 10-second timeout when fetching the list of images.This change basically implements Happy Eyeballs (RFC 8305):