elastic学习-单双三节点

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.
作者:风雪十年灯原文地址:https://segmentfault.com/a/1190000043526964

%s 个评论

要回复文章请先登录注册