The current JedisCluster strategy for reacquiring routing tables (calling Cluster Slots) is:
- When the client encounters the server, it returns
MOVED.
- When the client fails for
maxAttempts times.
One of our customers, who was using JedisCluster but in a quiescent state (i.e. without any access), initially connected to cluster A, but then some of the nodes in cluster A were taken offline and the IPs were reused in cluster B. At this time JedisCluster is connected to cluster B.
How to Fix
We need to add a periodic topology refresh mechanism to JedisCluster. For example, Lettuce's enablePeriodicRefresh parameter.
ClusterTopologyRefreshOptions refreshOptions = ClusterTopologyRefreshOptions.builder()
.enablePeriodicRefresh(Duration.ofSeconds(15)).build();
The current JedisCluster strategy for reacquiring routing tables (calling
Cluster Slots) is:MOVED.maxAttemptstimes.One of our customers, who was using JedisCluster but in a quiescent state (i.e. without any access), initially connected to cluster A, but then some of the nodes in cluster A were taken offline and the IPs were reused in cluster B. At this time JedisCluster is connected to cluster B.
How to Fix
We need to add a periodic topology refresh mechanism to JedisCluster. For example, Lettuce's
enablePeriodicRefreshparameter.