golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.85k stars 17.52k forks source link

net: add support for Happy Eyeballs version 2 (RFC 8305) #23841

Open mikioh opened 6 years ago

mikioh commented 6 years ago

Since RFC 6555 published, research papers, for example, Measuring the Effects of Happy Eyeballs, depict improvement space for the RFC. In addition, network or service operators speak up that the race is not only for TCP connection setup but for DNS query handling. RFC 8305 Happy Eyeballs version 2 addresses such issues.

To summarize, version 2 clarifies the existing algorithm, modifies the configurable variable values for performance improvement and adds consideration for various circumstances such as IPv6-IPv4 transition and VPN. Luckily, there's no significant user-visible behavioral change.

I'd like to propose to replace the existing RFC 6555 implementation with RFC 8305 implementation after landing dns/dnsmessage package (#16218).

bradfitz commented 6 years ago

Summarize what this means for Go, so we don't need to diff RFC 6555 vs 8305.

Just add Happy Eyeballs-ish behavior to DNS lookups?

mikioh commented 6 years ago

Just add Happy Eyeballs-ish behavior to DNS lookups?

Yup, mostly. FWIW, https://tools.ietf.org/html/rfc8305#appendix-A

bradfitz commented 6 years ago

Seems fine. As long as the code can be done without too much complexity.

rsc commented 6 years ago

Accepted but only if the result is simple enough.