You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
When customers are using a load balancer, the load balancer can add and remove IP’s dynamically. When an IP is removed, the Riak client fails in two subtle ways.
If the previous connect was created less than DNSTTL timespan ago, the Java client gets another connection. If it is more then a full process of doing a DNS check and getting a connection is followed. If an IP has been dynamically changed in the “less than” timespan, issues arise.
If a domain name is being used, the Java client gets only the IP addresses for it on RiakNode:start. If the load balancer changes IP address, the InetSocketAddress is never updated as the Java client never does another DNS lookup for the domain name case, meaning we never know if the IP address changes.
One customer implemented a fix in their system by changing the doGetConnection() method in the following way:
InetSocketAddress socketAddress = new InetSocketAddress(remoteAddress, port);
bootstrap.handler(new RiakChannelInitializer(this))
.remoteAddress(socketAddress);
Before this call:
ChannelFuture f = bootstrap.connect();
Additionally, the fix included adding the java opt -Dsun.net.inetaddr.ttl=10.
This fix has been tested by @A1 although, of course, other fixes may be possible.
We are currently using Riak in AWS and have been told repeatedly by Basho support to use ELB's in front of our Riak cluster as a best practice (to ease maintenance, to only send traffic to healthy nodes, etc...). Especially in AWS's environment, this defect guarantee's periodic outages of our services - requiring them to be restarted. We raised this same issue with Riak 1.4.x last year and it appears to still not be fixed. When will this be tested and fixed?
If you used the Java Client in a cloud environment where IP addresses for DNS entries could change often, the Java client would not expire the old DNS lookup to get the newest IP address.
Can we please have an update on when this will be released? I see it marked as "Milestone 2.0.3"... But, since you already released 2.0.4, when should we expect this to be released?
Connects to basho/riak-clients#1
When customers are using a load balancer, the load balancer can add and remove IP’s dynamically. When an IP is removed, the Riak client fails in two subtle ways.
DNSTTLtimespan ago, the Java client gets another connection. If it is more then a full process of doing a DNS check and getting a connection is followed. If an IP has been dynamically changed in the “less than” timespan, issues arise.RiakNode:start. If the load balancer changes IP address, theInetSocketAddressis never updated as the Java client never does another DNS lookup for the domain name case, meaning we never know if the IP address changes.One customer implemented a fix in their system by changing the doGetConnection() method in the following way:
Before this call:
Additionally, the fix included adding the java opt
-Dsun.net.inetaddr.ttl=10.This fix has been tested by @A1 although, of course, other fixes may be possible.