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?