Dual stack: how clients choose between IPv4 and IPv6
A dual-stack host is reachable over IPv4 and IPv6. A client may receive several A and AAAA answers, sort them, and schedule attempts so a broken path does not create a long user-visible delay. The modern strategy is described by the Happy Eyeballs algorithm.
Key points in one minute
- A records contain IPv4 while AAAA records contain IPv6.
- A client may stagger attempts across address families.
- The first successful connection determines the path actually used.
- A DNS record alone does not prove route availability.
Concurrent name resolution
Happy Eyeballs recommends starting AAAA and A queries close together instead of waiting indefinitely for one family. Results are sorted under the client's policy. This reduces visible delays on partially broken networks.
Racing connections without a burst
Attempts are scheduled rather than launched indiscriminately. Once one connection succeeds, the others are canceled. This retains an IPv6 preference while allowing IPv4 to succeed when the IPv6 path is unavailable or significantly slower.
Address families on a proxy path
The proxy endpoint family and destination family are separate. A client can reach a proxy over IPv4 while the proxy reaches a site over IPv6, when protocol and routing support it. Logs should capture both hops.
Dual-stack diagnostics
Record the A and AAAA set, then run forced IPv4 and IPv6 tests against your own service. Measure resolution, connection, and TLS separately. Finally test automatic selection to observe the client's real behavior.
Practical checklist
- 1Retrieve current A and AAAA records.
- 2Test each address family explicitly.
- 3Record proxy and destination families separately.
- 4Compare DNS, connect, and TLS timing.
- 5Test automatic selection after isolated checks.
Sources and documentation
This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.