关于elasticsearch:elastic学习单双三节点

47次阅读

共计 820 个字符,预计需要花费 3 分钟才能阅读完成。

1. 单节点模式

To ensure your cluster can report a green status, override the default by setting index.number_of_replicas to 0 on every index.

2. 两个节点的集群

  1. 两个节点都作为数据节点;

    recommend they both be data nodes

  2. index.number_of_replicas: 1 每个索引都设置备份数为 1;

    setting index.number_of_replicas to 1 on every index

  3. 其中一个节点设置 node.master: false,确保一个节点不是 master 备选节点;

    set node.master: false on one of your two nodes so that it is not master-eligible

  4. (默认每个节点都有全副的 role) 双节点时,设置其中一个不要作为备选 master 的节点!(node.master: false)

    By default, each node is assigned every role. We recommend you assign both nodes all other roles except master eligibility. If one node fails, the other node can handle its tasks.

  5. 不举荐双节点 - 弹性力有余

    Because it’s not resilient to failures, we do not recommend deploying a two-node cluster in production.

3. 3 个节点集群

  1. 设置一个仅投票节点:node.roles: [data, master, voting_only] (必须是 master,然而不会成为 master, 历史起因)

    Only nodes with the master role can be marked as having the voting_only role.

正文完
 0