Skip to content
AdminKit

Happy Eyeballs

What is Happy Eyeballs?

Happy Eyeballs, specified in RFC 8305 (updating the original RFC 6555), is an algorithm a dual-stack client uses to race IPv6 and IPv4 connection attempts, keeping whichever completes first rather than waiting for a broken path to time out. AdminKit's DNS lookup resolves both the A and AAAA records that race runs over.

By AdminKit team, Netbase JSC · Updated

Happy Eyeballs, specified in RFC 8305, is an algorithm a dual-stack client uses to connect to a destination that publishes both an IPv6 (AAAA) and an IPv4 (A) address, without waiting for a slow or broken path to time out before trying the other. The client starts an IPv6 connection attempt first and, if it hasn’t succeeded within a short delay (RFC 8305 recommends around 250 milliseconds), starts an IPv4 attempt in parallel, keeping whichever connection completes first and abandoning the other — the same race-and-keep-the-winner approach the Go standard library’s net.Dialer documents as “Happy Eyeballs” fast fallback, tuned by its FallbackDelay setting. Command-line clients expose the same delay as a setting: curl’s manual describes its —happy-eyeballs-timeout-ms option as giving IPv6 a head start of the specified number of milliseconds before an IPv4 attempt starts in parallel, with the first connection established being the one used. This replaced the original Happy Eyeballs described in RFC 6555, which RFC 8305, tracked by the IETF, updates with refinements like sorting destination addresses and tuning the connection-attempt delay. Without it, a client that only tried IPv6 first and waited for a full timeout before falling back would make dual-stack connectivity noticeably slower whenever a network’s IPv6 path was actually broken. The IPv4 half of that race is an ordinary A record lookup, run in parallel with the AAAA lookup rather than only after IPv6 times out. Multipath TCP solves a related but distinct problem: instead of racing two addresses and keeping only one, it keeps several network paths active for the same connection at once.

Happy Eyeballs only matters for a dual-stack client that has both an IPv6 and IPv4 path to try in the first place.

AdminKit groups happy Eyeballs under its IP & network cluster — browse the AdminKit glossary index for other related terms.

Frequently asked questions

How does Happy Eyeballs decide which connection to keep?

It starts an IPv6 attempt first, and if that hasn't succeeded within a short delay (RFC 8305 recommends around 250 milliseconds), starts an IPv4 attempt in parallel, keeping whichever connection completes first and abandoning the other.

What problem does Happy Eyeballs actually solve?

Without it, a client that only tried IPv6 first and waited for a full timeout before falling back would make dual-stack connectivity noticeably slower whenever a network's IPv6 path was actually broken.

How does RFC 8305 differ from the original Happy Eyeballs spec?

RFC 8305 updates the original algorithm in RFC 6555 with refinements like sorting destination addresses and tuning the connection-attempt delay, rather than changing the core race-both-and-keep-the-winner idea.

How is Happy Eyeballs different from Multipath TCP?

Happy Eyeballs races two addresses and keeps only the one that wins; Multipath TCP solves a related but distinct problem by keeping several network paths active for the same connection at once.