WARNING: Version 6.2 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
DNS cache settings
editDNS cache settings
editElasticsearch runs with a security manager in place. With a security manager in
place, the JVM defaults to caching positive hostname resolutions
indefinitely. If your Elasticsearch nodes rely on DNS in an environment where
DNS resolutions vary with time (e.g., for node-to-node discovery) then you might
want to modify the default JVM behavior. This can be modified by adding
networkaddress.cache.ttl=<timeout>
to your
Java
security policy. Any hosts that fail to resolve will be logged. Note also that
with the Java security manager in place, the JVM defaults to caching negative
hostname resolutions for ten seconds. This can be modified by adding
networkaddress.cache.negative.ttl=<timeout>
to your
Java
security policy.