OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 597 forks source link

DNS Reverse Lookups Creating Significant Performance Issues #14063

Open ram-ibm opened 4 years ago

ram-ibm commented 4 years ago

Describe the bug I am working with a customer to analyze performance issues with IBM Security Verify Access Appliance. This has WebSphere Liberty running inside of it. The appliance has IPv6 configured. Calls to LDAP server are making a DNS lookup using IPv6 that are timing out after 5seconds. This is causing unnecessary delays.

We are working around the issue by coding local /etc/hosts entries for the LDAP servers (and Oracle as well) to avoid the DNS lookup issue. This is, unfortunately, not a tenable solution - since there are too many servers to maintain /etc/host entries.

Providing a stack trace obtained from glowroot agent data used for analyzing.

Steps to Reproduce Configure IPv6 on a Server that has Liberty Running Make sure local DNS does not support IPv6 Trying making connections to LDAP or Oracle (it is possible other servers have similar issue)

Expected behavior We need a way to either avoid the IPv6 lookups and/or avoid the reverse lookup all together.

Diagnostic information:

Additional context Explored JVM options to turn off the Security Manager, dont think that is viable. IPv6 is needed for this server - so we cannot turn it off entirely.

ram-ibm commented 4 years ago

We are going to try using this setting to suppress IPv6 based DNS lookups: -Djava.net.preferIPv4Stack=true

Still unclear why a reverse lookup is happening and if we have control over that?