redis cluster salves election priority

99 views
Skip to first unread message

Sury Bu

unread,
Mar 31, 2017, 3:00:10 AM3/31/17
to Redis DB
In redis cluster mode, one master have several slaves, is there have some priority parameters that can make the specified salve election as the new master?
Since the master and slaves will host in the different available zone, we want the slave locate in the same available zone with win the election first.

wen...@gmail.com

unread,
Mar 31, 2017, 10:39:46 PM3/31/17
to Redis DB
As soon as a master is in FAIL state, a slave waits a short period of time before trying to get elected. That delay is computed as follows:
           DELAY = 500 milliseconds + random delay between 0 and 500 milliseconds + SLAVE_RANK * 1000 milliseconds

so, different slave will try to get elected at different time, SLAVE_RANK negotiate between all slaves when master is failing(the slave with the most updated replication offset is at rank 0, the second most updated at rank 1, and so forth.)

在 2017年3月31日星期五 UTC+8下午3:00:10,Sury Bu写道:

charlie kwon

unread,
Apr 2, 2017, 9:46:56 AM4/2/17
to redi...@googlegroups.com
http://redisgate.com/redis/sentinel/sentinel_election.php

This page introduces electing a sentinel leader.
Cluster leader elections are similar.


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Sury Bu

unread,
Apr 4, 2017, 10:48:52 PM4/4/17
to Redis DB
How can we change the DELAY value and set the salve in the different AZ lager?

Sury Bu

unread,
Apr 4, 2017, 10:50:08 PM4/4/17
to Redis DB
we have test the "slave-priority 100" parameter , it can't work in the cluster mode.


On Sunday, April 2, 2017 at 9:46:56 PM UTC+8, charlie kwon wrote:
http://redisgate.com/redis/sentinel/sentinel_election.php

This page introduces electing a sentinel leader.
Cluster leader elections are similar.

2017-04-01 11:39 GMT+09:00 <wen...@gmail.com>:
As soon as a master is in FAIL state, a slave waits a short period of time before trying to get elected. That delay is computed as follows:
           DELAY = 500 milliseconds + random delay between 0 and 500 milliseconds + SLAVE_RANK * 1000 milliseconds

so, different slave will try to get elected at different time, SLAVE_RANK negotiate between all slaves when master is failing(the slave with the most updated replication offset is at rank 0, the second most updated at rank 1, and so forth.)

在 2017年3月31日星期五 UTC+8下午3:00:10,Sury Bu写道:
In redis cluster mode, one master have several slaves, is there have some priority parameters that can make the specified salve election as the new master?
Since the master and slaves will host in the different available zone, we want the slave locate in the same available zone with win the election first.

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.

wenk712

unread,
Apr 5, 2017, 1:59:09 AM4/5/17
to redi...@googlegroups.com
as far as i know, there is no any way to change DELAY  so far


--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/saDKhT5M3mg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to redis-db+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages