How DNS Caching of Target Servers Work in Apigee

DNS entries of Target Servers are cached mainly at three levels in Apigee:

  1. DNS cache on the Message Processor host
  2. DNS cache in the JVM
  3. DNS cache in the Message Processor

Please find details of those below:

1. DNS Cache on the Message Processor Host

First the Target Server DNS entries get cached on the Message Processor host based on the TTL value given in the DNS entry in the DNS server.

This value can be found using the following command:

dig +nocmd +noall +answer +ttlid {record-type} {domain}
# for an example, the following output shows that the TTL of apigee.com is 60 seconds:

dig +nocmd +noall +answer +ttlid A apigee.com
apigee.com.		60	IN	A	54.66.217.6
apigee.com.		60	IN	A	3.24.101.152

2. DNS Cache in the JVM

Secondly Target Server DNS entries may get cached in the JVM based on following JVM configuration parameters:

networkaddress.cache.ttl (default: -1)

Specified in java.security to indicate the caching policy for successful name lookups from the name service. The value is specified as integer to indicate the number of seconds to cache the successful lookup. A value of -1 indicates "cache forever". The default behavior is to cache forever when a security manager is installed, and to cache for an implementation specific period of time, when a security manager is not installed.

networkaddress.cache.negative.ttl (default: 10)

Specified in java.security to indicate the caching policy for un-successful name lookups from the name service. The value is specified as integer to indicate the number of seconds to cache the failure for un-successful lookups. A value of 0 indicates "never cache". A value of -1 indicates "cache forever".

Reference: https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html

3. DNS Cache in the Message Processor

Finally, Target server DNS entries get cached in the Apigee Message Processor in memory using the following configuration parameter.

Configuration Parameter: HTTPClient.dns.ttl 
Configuration Parameter Unit: Seconds
Configuration File: http.properties

The default value of HTTPClient.dns.ttl is 60 seconds and the Message Processor will refresh cached entries every HTTPClient.dns.ttl/2 seconds.

Reference: https://docs-apis.apigee.io/files/ApigeeEdgeTroubleshootingGuide.pdf (Page 254)

Configuration Reference: https://docs.apigee.com/private-cloud/v4.19.06/how-configure-edge

Version history
Last update:
‎08-04-2020 07:35 PM
Updated by: