Hi,
I am facing a problem when redis is setup as a cluster connecting redis nodes from different machine as slaves to the master nodes of the cluster.
For a cluster to work properly, we require at least three masters up and running. I have a setup redis cluster on host 10.148.0.2 as following 10.148.0.2:6001 --> master A 10.148.0.2:6002 --> master B 10.148.0.2:6003 --> master C 10.148.0.2:6004 --> slave A1 of master A 10.148.0.2:6005 --> slave B1 of master B 10.148.0.2:6006 --> slave C1 of master C
I have also setup 3 slave nodes on host 10.148.0.3 which are connected to masters of host 10.148.0.2 as following, 10.148.0.3:6007 --> slave A2 of master A(10.148.0.2:6001) 10.148.0.3:6008 --> slave B2 of master B(10.148.0.2:6002) 10.148.0.3:6009 --> slave C3 of master C(10.148.0.2:6003)
Now following is the scenario to check whether slaves are getting promoted as master when the master goes down.
Scenario1 : master A(10.148.0.2:6001) goes down either of slaves A1(10.148.0.2:6004) or A2(10.148.0.3:6007) is promoted to master after node timeout is reached. This works fine for all the other masters going down as with master A.
But assume a case, where the setup is made and somehow the host(10.148.0.2) with all the three masters A,B,C itself crashes or shuts down. In this case the slaves on host(10.148.0.2) must be promoted as the new masters but this never happens.
How to handle this shut down scenario of host going down with all the master nodes and promoting the slaves of these masters on the other host to be promoted to masters. I have read a lot of redis cluster documentation on this regard. I could not find anything that can help.
Request all in the community to guide me through this particular shut down scenario.
Comment From: trevor211
I think you should ajust the deployment of redis instances. Try to distribute masters over different machines (better if the machines are geographically distributed).
Comment From: madabhaviamit
I think you should ajust the deployment of redis instances. Try to distribute masters over different machines (better if the machines are geographically distributed).
Hi Trevor,
I switched from redis cluster to sentinel and it solved my problem.. now i have one master and many slaves and as soon as a master goes down any one of the slaves becomes master. everything works fine until i have 1 master and 1 slave up and running. For Sentinel to be high available we would require at least 1 Master and 2 Slave configuration..
Comment From: trevor211
So far so good. Do you have any other questions? If not, can you close the issue?
Comment From: madabhaviamit
yes, i will close this now..
Regards, Amit M
On Thu, 13 Aug 2020, 06:25 WuYunlong, notifications@github.com wrote:
So far so good. Do you have any other questions? If not, can you close the issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/redis/redis/issues/7050#issuecomment-673185119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6YRKAJPKOHDVA54MAPA5TSAM2Y7ANCNFSM4L2BJYLA .