首页 > 解决方案 > cassandra 中的动态告密者

问题描述

cassandra.yaml 文件中以下参数的意义是什么,请注意我们拥有的各种类型的告密者。

dynamic_snitch_update_interval_in_ms: 100
dynamic_snitch_reset_interval_in_ms: 600000
dynamic_snitch_badness_threshold: 0.1

这些参数在较新的 Cassandra 版本中是否仍然具有重要意义?

谢谢布本

标签: cassandra

解决方案


动态的告密者不是一种类型的告密者,而是一个包装你确定的选择的告密者的包装器。它使告密者能够监控读取延迟,并帮助协调器确定要从中读取的最佳节点。更多关于这个告密者如何工作的信息可以在这里找到。

至于参数,在cassandra.yaml 文件中对每个参数都有一个简短的描述:

# controls how often to perform the more expensive part of host score
# calculation
dynamic_snitch_update_interval_in_ms: 100 

# controls how often to reset all host scores, allowing a bad host to
# possibly recover
dynamic_snitch_reset_interval_in_ms: 600000

# if set greater than zero, this will allow
# 'pinning' of replicas to hosts in order to increase cache capacity.
# The badness threshold will control how much worse the pinned host has to be
# before the dynamic snitch will prefer other replicas over it.  This is
# expressed as a double which represents a percentage.  Thus, a value of
# 0.2 means Cassandra would continue to prefer the static snitch values
# until the pinned host was 20% worse than the fastest.
dynamic_snitch_badness_threshold: 0.1

推荐阅读