Hi All, I am currently using the Riak java client v1.4.4, but have also encountered this issue in 2.0.x.
I am experiencing an issue where the underlying Riak load balancer IP changes (AWS load balancer) but the DNS cache in the Java app does get updated, even when the connection fails. I have set the network.cache.ttl to 0 in the java.security file for testing purposes but this does have any effect. I have created 2 separate Riak clusters with 2 different IP addresses and an entry in /etc/hosts (e.g. “192.168.1.10 riak”) that I swap back and forth while the application is live (it’s a Tomcat webapp). In the app configuration, I simply use the hostname as “riak” when connecting to the cluster (I.e. This is the placeholder for the load balancer name). Upon the application startup, I create the client with this hostname and call execute(s) on this client throughout the lifecycle of the application. Once the Riak client is created and a successful DNS lookup occurs, the Riak client (and underlying connection) hold on to the DNS lookup values and thus the underlying IP never appears to change (remember network.cache.ttl is set to 0). Changes to the hosts file never get propagated. The only way that I can make this work is if I create a new client on every call to the Riak cluster. This is VERY high volume application and I’m concerned about stress on the application if Im creating new clients on every single call. So if my understanding is correct, combined with the java.policy no DNS caching, shouldn’t the Riak Client correctly update the DNS cache? Or am I missing something? Any help would be greatly appreciated! Thanks, -- Trenton A. Taylor |Java Developer m: 404.583.1994 e: trenton.tay...@weather.com o: 300 Interstate N Pkwy SE, Atlanta, GA 30339
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com