First question: In a cluster, if a master node that has allocated slots goes offline, and this master node has no slave nodes, what will happen to the master node's slots?
The second question: will the slot information be persistent? Otherwise, every time you start the cluster, you have to use the add slot command?
Comment From: sixsixsix516
Thank you all for answering
Comment From: enjoy-binbin
- the whole cluster will be down (all the nodes will reject the commands), unless you enable
cluster-require-full-coveragesee https://github.com/redis/redis/blob/unstable/redis.conf#L1630
# By default Redis Cluster nodes stop accepting queries if they detect there
# is at least a hash slot uncovered (no available node is serving it).
# This way if the cluster is partially down (for example a range of hash slots
# are no longer covered) all the cluster becomes, eventually, unavailable.
# It automatically returns available as soon as all the slots are covered again.
#
# However sometimes you want the subset of the cluster which is working,
# to continue to accept queries for the part of the key space that is still
# covered. In order to do so, just set the cluster-require-full-coverage
# option to no.
#
# cluster-require-full-coverage yes
- yes cluster-config-file, see https://github.com/redis/redis/blob/unstable/redis.conf#L1533
# Every cluster node has a cluster configuration file. This file is not
# intended to be edited by hand. It is created and updated by Redis nodes.
# Every Redis Cluster node requires a different cluster configuration file.
# Make sure that instances running in the same system do not have
# overlapping cluster configuration file names.
#
# cluster-config-file nodes-6379.conf
Comment From: uvletter
As far as I know 1. All slot migration is only triggered by command, which means the cluster won't adjust the slot distribution automatically. So nothing will happen to the slots of the offline node
- Yes it does. the cluster conf path is designated by cluster-config-file option
Welcome for corrections
Comment From: sixsixsix516
thanks