Redis 3.2.10 cluster and sentinel questions

127 views
Skip to first unread message

Home Hunter

unread,
Aug 30, 2017, 5:39:56 PM8/30/17
to Redis DB
I am very new to Redis and i installed 3.2.10 on linux.

I have a couple of questions:
1) I am running a 3 shard cluster with 1 slave for each shard (a total of 6 nodes). The cluster is able to fail-over/fail-back etc successfully without sentinels.

Do i still need sentinel? 
If so, how would sentinel work in conjunction with clustering (because they have over-lapping functionality such as automatic fail-over etc?

what should be the sentinel conf file and how many sentinels?

2) I am testing  fail-over/fail-back in the above cluster with no sentinel. I am facing the following problem. any suggestion on how to solve this problem?

In the Cluster with 3 shards with 1 slave for each master, i took down the primary of a shard , then the secondary became primary.
I took down the new primary too. The cluster is marked as down now.
I re-started one redis which was a slave before starting and then it came back online as a slave itself and so the cluster was still marked as down. How would i bring it up as a master so that the cluster is shown as online?

3) What is your take on using redis 4.0 for production? Being a very new release, do you anticipate any problems?

I really appreciate your feedback on this.

hva...@gmail.com

unread,
Aug 30, 2017, 9:21:11 PM8/30/17
to Redis DB
Redis Cluster is the multi-instance, automatic sharding configuration of Redis Server.  This configuration has failover functions built in.  It does not need Sentinel.

Sentinel is for the non-sharding configuration of Redis server.  This configuration does not have failover functions, so it needs an external program to provide them.  Sentinel is the external program provided by the Redis server developers.

Since you are using Redis Cluster, you do not need Sentinel.  In fact, trying to use Sentinel with Redis Cluster will cause trouble, interfering with each other's attempts to fail over and recover from faults.

Home Hunter

unread,
Aug 31, 2017, 6:41:10 PM8/31/17
to Redis DB
Thanks for the reply.
Do you have an answer for the following (rephrased) question please? 

2) I am facing the following problem during the testing. Any suggestion on how to solve this problem?

In the Cluster with 3 masters with 1 slave for each master, i took down the slave of a master and then I took down the master too. The cluster is marked as down now.
I re-started the slave and it came back online as a slave itself and so the cluster is still marked as down because these is no primary/master. 
Looks like the cluster software is not intelligent enough to observe that the slave that came online is the only member in that shard and so the cluster should make it as Primary but it is not.
How would i bring up the slave as a master?

Tuco

unread,
Aug 31, 2017, 11:55:05 PM8/31/17
to Redis DB
Hi, I think right now, you can manually bring it up as master using the "cluster failover force" command on slave to get it to become master. Not sure about the automatic way.

Home Hunter

unread,
Sep 5, 2017, 2:47:54 PM9/5/17
to Redis DB
Thanks Tuco. It worked. appreciate your inputs.
Reply all
Reply to author
Forward
0 new messages