4 ms·
Yes, it will connect just fine over v6 if no v4 addresses are available. It should, however, try v6 first and then fall back to v4. At least on Linux and OSX,
by simon_vetter 13y ago
Yes, it will connect just fine over v6 if no v4 addresses are available. It should, however, try v6 first and then fall back to v4.
At least on Linux and OSX, getaddrinfo() won't return ipv6 addresses if the local machine doesn't have any global ipv6 address, which means that a server without ipv6 connectivity won't waste any cycle trying to use addresses it can't reach.
Preferring v4 means that you'll never shift your traffic over to v6 unless v4 is shut down.
Because networks and services are going to be dual stack for as long as sysadmins see substantial v4 traffic, such behavior will create another chicken and the egg problem.
It will also put more strain on the network (as traffic will eventually have to go through multiple layers of NAT, etc), render operations more difficult (how do I know who made that request if an entire datacenter is behind one or two ip addresses?), and in the end, make network operations more expensive, because we'll have to run dual stack longer than necessary.
- blakesmith 13y agoThanks for following up and clarifying!