ES 分布式部署

# 需要配置的参数
cluster.name: uap 必须相同 node.name: uap
-server 不同 network.host: 172.17.6.29 作用? discovery.zen.ping.unicast.hosts: ["172.17.6.27", "172.17.6.28", "172.17.6.29"] node.master: true node.data: true discovery.zen.minimum_master_nodes: 3 http.cors.enabled: true http.cors.allow-origin: "*"

#注:es版本是5.6.16

 

network.host

作用: 是network.bind_host和network.publish_host的合并,其中

network.bind_host:指定该节点将绑定到该主机名或IP地址

network.publish_host:设置其他节点连接此节点的地址

值可以是数组形式

节点的角色

# 主节点&数据节点,不建议使用
node.master: true
node.data: true

# 主节点,索引和集群控制
node.master: true
node.data: false

# 数据节点,只存储数据
node.master: false
node.data: true

# client节点,针对海量请求的时候可以进行负载均衡
node.master: false
node.data: false

参考:
https://www.cnblogs.com/37yan/p/9928748.html
https://my.oschina.net/u/2449787/blog/1635447

discovery.zen.minimum_master_nodes

为了避免脑裂,集群节点数最少为 半数取整 + 1

原文地址:https://www.cnblogs.com/stellar/p/12055190.html