Разница между `cluster-allow-reads-when-down` и` cluster-require-full-cover` в redis v6 - PullRequest
1 голос
/ 04 августа 2020

Согласно документации, ниже приведены расширения: https://raw.githubusercontent.com/redis/redis/6.0/redis.conf

# By default Redis Cluster nodes stop accepting queries if they detect there
# is at least an 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


# This option, when set to yes, allows nodes to serve read traffic while the
# the cluster is in a down state, as long as it believes it owns the slots. 
#
# This is useful for two cases.  The first case is for when an application 
# doesn't require consistency of data during node failures or network partitions.
# One example of this is a cache, where as long as the node has the data it
# should be able to serve it. 
#
# The second use case is for configurations that don't meet the recommended  
# three shards but want to enable cluster mode and scale later. A 
# master outage in a 1 or 2 shard configuration causes a read/write outage to the
# entire cluster without this option set, with it set there is only a write outage.
# Without a quorum of masters, slot ownership will not change automatically. 
#
# cluster-allow-reads-when-down no

Однако мне еще предстоит понять, отключается ли пара главный-подчиненный в кластере Redis, какая из этих конфигураций вступит в силу, что позволит мне продолжать принимать чтения ..? Это cluster-require-full-coverage no или cluster-allow-reads-when-down yes

...