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.hosthtml

做用: 是network.bind_host和network.publish_host的合併,其中node

network.bind_host:指定該節點將綁定到該主機名或IP地址數組

network.publish_host:設置其餘節點鏈接此節點的地址cors

值能夠是數組形式負載均衡

 

節點的角色spa

# 主節點&數據節點,不建議使用 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
http://www.javashuo.com/article/p-csziwdoz-gd.html

 

discovery.zen.minimum_master_nodes.net

爲了不腦裂,集羣節點數最少爲 半數取整 + 1code

相關文章
相關標籤/搜索