Skip to content

Stagger connection attempts across resolved addresses (RFC 8305) - #935

Open
arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:happy-eyeballs-connection-racing
Open

arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:happy-eyeballs-connection-racing

Conversation

@arturobernalg

@arturobernalg arturobernalg commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Races connection attempts across a host's resolved addresses instead of trying them strictly sequentially. First address immediately, each next one after a delay (250ms default) or at the RFC 8305 minimum spacing (10ms) if an earlier one just failed.

First success wins; every other attempt is cancelled or its socket closed.

Opt-in, off by default; disabled behavior is unchanged.

Races connection attempts across a host's resolved addresses instead
of trying them strictly sequentially: first address immediately, each
next one after a configurable delay (250ms default) unless an earlier
one fails first, in which case the next address starts at the RFC
8305 Section 5 minimum spacing (10ms). First success wins; the rest
are cancelled or closed. An attempt cancelled from outside the race is
treated like a failure so the future is never left pending forever.

A winning session can be selected by the race at the same moment the
caller cancels the outer Future directly. ComplexFuture#completed then
returns false; close the session instead of silently dropping it.

Opt-in, off by default; disabled behavior is unchanged.
@arturobernalg
arturobernalg force-pushed the happy-eyeballs-connection-racing branch from 3d985dd to 1abc5cf Compare November 11, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant