Closed
Description
Documenting for awareness. By default, the Lookup class will check the contents of /etc/hosts
on every A and AAAA lookup, via a call to HostsFileParser#getAddressForHost
. This method is synchronized and creates a hot path in a high-volume environment. There is also an I/O operation (in validateCache
) inside the synchronized block, which contributes to the contention.
A workaround for this problem is to call Lookup#setDefaultHostsFileParser
, Lookup#setHostsFileParser
, or use the dnsjava.lookup.use_hosts_file
configuration property.
Perhaps a future version of dnsjava could disable this feature by default?
Metadata
Metadata
Assignees
Labels
No labels