LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS Cache (http://www.linuxquestions.org/questions/linux-networking-3/dns-cache-33544/)

Architect 10-23-2002 11:58 AM

DNS Cache
 
I have a Linux Java Application that communicates with J2EE servers (RMI/IIOP). I will be using a DNS sever to load balance among the application servers (can't find any existing load balancer that specifically handles RMI/IIOP). When/if an application server fails I can take it out of the DNS list. However, I believe that Linux caches the name entries on the client. Does anyone know how long the cache entries live on Linux? Is there a way to flush the cache, or bypass it from a Java application?

The behavior I am looking for is: server goes down... i take the server out of the DNS server list.... the application gets a communications error (ORB error, can't communicate with the current server).. then the app flushes the DNS entry or cache on the Linux client and retrys the DNS lookup... it gets to the DNS server which points the client machine to a new (working) application server...

Is this possible?

acid_kewpie 10-23-2002 12:25 PM

i think the entries validity is defined by each zone file, the expires, refresh options etc...

the cache is restarted each time bind is restarted, and no other way AFAIK

RijilV 10-25-2002 05:02 AM

Unless you are running Bind or some other nameserver, Linux does no internal caching of DNS. There is no built in nameserver to the Linux kernel.


depending on how much control you have over this enviroment, you can make the nameservers your Linux clients are using slave servers to your master list you're taking entries out of, so when you update and restart those nameservers they'll push down the changes. also you can lower the values for caching (man named.conf )


All times are GMT -5. The time now is 03:54 AM.