curl takes 1s because it tries IPv6 first
On our Ubuntu 22.04 CI, curl to an internal hostname takes about 1s then succeeds. The A record exists, AAAA record was deleted years ago. Adding -4 makes it instant. curl -v shows it trying an IPv6 address first, timing out, then falling back to IPv4. Why is it trying IPv6 at all? It is only internal hostnames, external ones resolve fast.
4 replies