Quantcast
Channel: Lettuce fail over in cluster - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Lettuce fail over in cluster

$
0
0

I am trying to get Lettuce to connect to the newly promoted master (former slave) after the old one failed. But all writes stop. The writes continue after the failed host reconnects, now as a slave. And it continues to write to the new master (former slave).

I tried setting periodic topology refreshes, as well as adaptive ones on all events but it didn't help. Is there another setting I have to use?

This is how I configured the client:

final List<RedisURI> redisURIs = buildRedisURIs(redisServerSettings.getNodes());
final RedisClusterClient client = RedisClusterClient.create(clientResources, redisURIs);
final ClusterTopologyRefreshOptions refreshOptions =
        ClusterTopologyRefreshOptions.builder()
                                     .enableAllAdaptiveRefreshTriggers()
                                     .adaptiveRefreshTriggersTimeout(Duration.ofMinutes(2))
                                     .refreshTriggersReconnectAttempts(2)
                                     .enablePeriodicRefresh(Duration.ofMinutes(10))
                                     .build();
client.setOptions(ClusterClientOptions.builder().topologyRefreshOptions(refreshOptions).build());

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images