此内容没有您所选择的语言版本。

E.3. Changing Consensus Timeout


The consensus timeout specifies the time (in milliseconds) to wait for consensus to be achieved before starting a new round of membership configuration.
When consensus is calculated automatically, the following rules will be used:
  • If configuring a cluster of 2 or less nodes, consensus will be (token * 0.2) , with a maximum of 2000 milliseconds and a minimum of 200 milliseconds.
  • If configuring a cluster of 3 or more nodes, consensus will be (token + 2000 milliseconds)
If you let cman configure your consensus timeout in this fashion, realize that moving from 2 to 3 (or more) nodes will require a cluster restart, since the consensus timeout will need to change to the larger value based on the token timeout.
When configuring a 2-member cluster with the ultimate intention of adding more nodes at a later time, you must adjust the consensus timeout so that you do not have to restart the cluster to add the new nodes. To do this, you can edit the cluster.conf as follows:

<totem token="X" consensus="X + 2000" />
Note that the configuration parser does not calculate X + 2000 automatically. An integer value must be used rather than an equation.
The advantage of the optimized consensus timeout for 2 node clusters is that overall failover time is reduced for the 2 node case since consensus is not a function of the token timeout.

Note

For two node auto-detection in cman, the number of physical nodes matters and not the presence of the two_node=1 directive in cluster.conf.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.