You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if the operator is already implemented this way, but below is how Sentinel decides which replica to choose when performing a failover. If not, maybe the operator can use a similar logic to pick the most desired replica instance.
Step-1 Use the replica with the lowest replica-priority
As documented here, Sentinal prioritizes the replica-priority value when choosing a replica for failover.
This value is returned by the Redis INFO command as slave_priority.
If all replicas have the same replica-priority value, go to Step-2.
Step-2 Use the replica with the highest slave_repl_offset.
The slave_repl_offset value, as returned by the INFO command, reports the replication offset of the replica instance.
A replica instance with a higher slave_repl_offset value means that it is the closest to the primary instance in terms of replication, thus more suitable for a promotion.
If more than one replica instances have the same slave_repl_offset value, go to Step-3.
Now that Dragonfly has the offset, It totally makes sense to use it and be intelligent about the choice! This should also be an easy fix considering all the parts are already there.
I am not sure if the operator is already implemented this way, but below is how Sentinel decides which replica to choose when performing a failover. If not, maybe the operator can use a similar logic to pick the most desired replica instance.
Step-1 Use the replica with the lowest
replica-priority
replica-priority
value when choosing a replica for failover.slave_priority
.replica-priority
value, go to Step-2.Step-2 Use the replica with the highest
slave_repl_offset
.slave_repl_offset
value, as returned by the INFO command, reports the replication offset of the replica instance.slave_repl_offset
value means that it is the closest to the primary instance in terms of replication, thus more suitable for a promotion.slave_repl_offset
value, go to Step-3.Step-3 Use the lowest
run_id
value.run_id
value as the last resort.The text was updated successfully, but these errors were encountered: