gpt4 book ai didi

cassandra - cassandra 中的故障检测和恢复机制如何工作?

转载 作者:行者123 更新时间:2023-12-02 22:50:00 32 4
gpt4 key购买 nike

致所有 Cassandra 专家,

我正在尝试了解 cassandra 故障检测和恢复。我对它到底是如何工作的有点困惑。

来自 Datastax 文档:

Configuring the phi_convict_threshold property adjusts the sensitivity of the failure detector. Lower values increase the likelihood that an unresponsive node will be marked as down, while higher values decrease the likelihood that transient failures causing node failure. In unstable network environments (such as EC2 at times), raising the value to 10 or 12 helps prevent false failures.

来自http://ljungblad.nu/post/44006928392/cassandra-and-its-accrual-failure-detector

Phi represents the likelihood that Node A is wrong about Node B’s state.The higher the Phi, the bigger the confidence that Node B has failed.

有人可以详细解释一下C*故障检测机制以及C*如何在不同场景下恢复它吗?

提前致谢

柴蒂

最佳答案

我不认为自己是 Cassandra 专家,但以下是我对 Cassandra 的节点故障检测的看法:

  1. 每个节点每秒联系 1-3 个其他节点,询问节点状态和位置。这些带时间戳的消息已经过了Gossip 协议(protocol)
  2. Snitch分区器通知节点的机架和数据中心拓扑。动态告密可以检测节点是否以较差的性能(读取和写入)级别运行,并且在正常运行之前不会执行读取或写入操作。
  3. 提示切换是针对离线节点的分区写入的恢复机制。协调器存储写入路径上的每个节点是否确认写入操作并将提示存储在system.hints表中。如果目标节点重新上线,则会重新尝试写入。

当节点离线或性能不佳时,所有这些通信方法都会协同工作,并且可以进行配置。据我所知,Cassandra不会让节点在故障后恢复;这需要人工干预才能使节点重新上线并运行nodetool来修复故障节点上的数据。

根据您的组织对读取和写入操作的容错能力,您始终可以配置一致性级别

管理节点故障的一些资源:

  1. (首先检查您的 C* 版本)DataStax Failure detection and recovery
  2. C* High Availability from Planet Cassandra
  3. Configuring Consistency Level

关于cassandra - cassandra 中的故障检测和恢复机制如何工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29532159/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com