Skip to content

Commit a967702

Browse files
authored
Add note to low-level client docs for DNS caching (#29213)
This commit adds a note to the low-level REST client docs regarding the possibility of being impacted by the JVM DNS cache policy under a default security manager policy.
1 parent 14157c8 commit a967702

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/java-rest/low-level/configuration.asciidoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,16 @@ will be used.
8686

8787
For any other required configuration needed, the Apache HttpAsyncClient docs
8888
should be consulted: https://hc.apache.org/httpcomponents-asyncclient-4.1.x/ .
89+
90+
NOTE: If your application runs under the security manager you might be subject
91+
to the JVM default policies of caching positive hostname resolutions
92+
indefinitely and negative hostname resolutions for ten seconds. If the resolved
93+
addresses of the hosts to which you are connecting the client to vary with time
94+
then you might want to modify the default JVM behavior. These can be modified by
95+
adding
96+
http://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html[`networkaddress.cache.ttl=<timeout>`]
97+
and
98+
http://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html[`networkaddress.cache.negative.ttl=<timeout>`]
99+
to your
100+
http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.html[Java
101+
security policy].

0 commit comments

Comments
 (0)