Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Happy Eyeballs for TCP connections #25661

Open
lucacasonato opened this issue Sep 16, 2024 · 1 comment
Open

Implement Happy Eyeballs for TCP connections #25661

lucacasonato opened this issue Sep 16, 2024 · 1 comment
Labels
ext/net related to ext/net feat new feature (which has been agreed to/accepted)

Comments

@lucacasonato
Copy link
Member

Right now we generally prefer IPv6 to IPv4 addresses when connecting to services. This unfortunately causes users to run into "connection failed" errors when their service does not actually listen on IPv6 (even though the DNS resolves to an IPv6 address).

Happy Eyeballs fixes this. It establishes connections to multiple addresses in parallel and uses the first one that connects.

@lucacasonato lucacasonato added feat new feature (which has been agreed to/accepted) ext/net related to ext/net labels Sep 16, 2024
@seanmonstar
Copy link
Contributor

As on potential option, the HttpConnector in hyper-util provides happy eyeballs, and it returns a TcpStream (just pluck it out of the TokioIo wrapper). It could be as easy as replacing the call of TcpStream::connect with a http_connector.call().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext/net related to ext/net feat new feature (which has been agreed to/accepted)
Projects
None yet
Development

No branches or pull requests

2 participants