NOTE: There are two main things that could cause results that may differ from expectations.
Firstly, Java performs its own DNS caching. Cache TTLs can be configured with security properties {@code networkaddress.cache.ttl} and {@code networkaddress.cache.negative.ttl} or corresponding system properties{@code sun.net.inetaddr.ttl} and {@code sun.net.inetaddr.negative.ttl}. The default cache TTL is implementation specific, but typically 30 seconds if there is no security manager installed and infinite if there is. The default negative cache (caching nonexistence of a record) TTL is 10 seconds.
Secondly, for a consistent connection string, the DNS provider must produce all records for a hostname. Some DNS servers will only provide a subset of the records for a given hostname - for example, tinydns returns a maximum of 8 records in response to a query.
|
|
|
|