How can we get the IP address of the target server currently being used by Apigee ?

Our API proxies use target server to connect to backend server. We want to conduct DR test by changing our DNS to a different IP address for the target server. We understand that IP address of target server is being cached a certain period of time.

Is there a management API that we can use to get the actual IP address of target server that is cached by Apigee system ?

Basically we want to know if Apigee Edge refreshed the DNS cache with the new target IP address after the cache time expires.

We are on Private Cloud.

0 1 2,218
1 REPLY 1

Please note that the IP address of the target server(s) are cached within the Message Processor's memory and it gets refreshed every 5 mins by default. There is no management API that gives the information about the target server's IP address being used by the Message Processor.


Whenever the DNS refresh happens, you can see an INFO message in the Message Processor's system.log. You can use this technique to verify if the new IP addresses are cached after the cache time expires.

In latest versions, the INFO message will be as follows:

NIOThread@9 INFO c.a.p.h.d.DNSCachedAddress - DNSCachedAddress.reportDifferences() : DNS Refresh for host: <hostname>:<port#> Added 3 IPs [hostname/IPaddress1, hostname/IPaddress2, hostname/IPaddress3] Removed 3 IPs [hostname/IPaddress1, hostname/IPaddress2, hostname/IPaddress3]

Note: The number of target IP addresses listed in the above message depends on the how many addresses the target server hostname resolves to.

In the older versions, you may see a message like this:

system-2017-02-20.0.log:2017-02-20 01:01:37,907 org:<orgname> env:<envname> api:SAL_V1 rev:2 messageid:csaprtstgwb8002-7163-525307-2 NIOThread@3 WARN c.a.p.h.d.DNSCachedAddress - DNSCachedAddress.addressNotReachable() : The last address has been removed from Address list <hostname>/<IP address> refreshing