DNS lookups slow in Java due to poor response to IPv6 AAAA records
Issue
- DNS lookups within my Java application are slow due to poor response to IPv6 AAAA record requests within my DNS infrastructure.
- This is similar to Why are IPV6 DNS lookups done even when IPV6 is disabled in Red Hat Enterprise Linux?
- How can I change the
getaddrinfo(AF_UNSPEC)system call behaviour in Java, to only look up IPv4 A records when a DNS request is made?
Environment
- Red Hat Enterprise Linux (RHEL)
- Java application performing DNS lookups
- DNS server which responds poorly/slowly to IPv6 AAAA requests
- JBoss Enterprise Application Platform (EAP)
- Tomcat
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
