File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -303,12 +303,17 @@ single request.
303303==== DNS Caching
304304
305305This plugin uses the JVM to lookup DNS entries and is subject to the value of
306- https://docs.oracle.com/javase/7 /docs/technotes/guides/ net/properties.html[networkaddress. cache.ttl],
307- a global setting for the JVM.
306+ https://docs.oracle.com/en/java/ javase/21 /docs/api/java.base/java/ net/doc-files/net- properties.html#address- cache-heading[Address Cache settings]
307+ such as `networkaddress.cache.ttl` and `networkaddress.cache.negative.ttl`, global settings for the JVM.
308308
309309As an example, to set your DNS TTL to 1 second you would set
310310the `LS_JAVA_OPTS` environment variable to `-Dnetworkaddress.cache.ttl=1`.
311311
312+ The default value for `networkaddress.cache.ttl` depends on the JVM implementation,
313+ which is 30 seconds for the JDK bundled with Logstash.
314+ The `networkaddress.cache.negative.ttl` setting, that controls how long Java caches
315+ the result of failed DNS lookups, defaults to 10 seconds.
316+
312317Keep in mind that a connection with keepalive enabled will
313318not reevaluate its DNS value while the keepalive is in effect.
314319
You can’t perform that action at this time.
0 commit comments