How to ensure, that the changes in the /etc/hosts file and DNS are picked up by the gateway?
The Backend servers sometimes change IP-address. Some of these changes are done within the DNS other are set via the /etc/hosts file of the gateway.
The machine itself, will pick up the changes directly. But the gateway service runs as a java process and this java process needs to pick up the changed values.
To ensure this there are 2 options:
1) restart the gateway service on the node.
2) The refresh of the cache in java is configured by the value of "networkaddress.cache.ttl" in the java.security file (/opt/SecureSpan/JDK/jre/lib/security/java.security)
The JVM uses this to configure TTL for the DNS cache. If the "networkaddress.cache.ttl" option is set to zero, the java process would never cache DNS lookups.
At that time the OS DNS caching policy would be determining what is done as beyond that the underlying OS would handle resolution. It would also depend on how long you have set the TTL for the records in your environment.