redisredissondistributed-lock

What will happen if a shard fails in Redis Cluster?


We have a Redis cluster with 3 shards each with a replica node. If a is lock acquired in a shard and while the thread is holding the lock the master and replica node goes down. Will the cluster wait until the shard comes back live and not accept new locks until then OR will it run with 2 shards and create a new lock in a new shard?


Solution

  • That depends on retryAttempts and retryInterval settings. They should be big enough to survive failover.