我们目前拥有一个强大的12节点集群,其中所有节点都是主要资格,客户端和数据.最近我们遇到了一个裂脑问题,主人没有反应太久,另一个节点选出了自己.尽管所有节点都已启动且minimum_master_nodes设置为7(新主节点可以看到其他10个符合条件的节点).我们希望通过将3个节点设置为主要合格而将其他9个节点设置为客户端来降低风险,而所有12个节点都是数据节点.我以为我们可以设置:
node.master: true node.client: false node.data: true
在3个节点上:
node.master: false node.client: true node.data: true
在另一方面9.这导致:
"org.elasticsearch.ElasticsearchIllegalStateException: node is not configured to store local location"
我一直在寻找无济于事.有没有正确的方法来实现这一目标?
我将跳过使用node.client - 它实际上与您的node.data设置冲突,这就是导致错误消息的原因.这也不是必需的.
您只需要node.master和node.data.如果两者都为真(默认值),则它既是数据节点又是主节点.如果master为false且data为true,则它是仅数据节点.如果master为true且data为false,则它是仅主节点.如果两者都是假的,那么它就是一个客户端节点.
从版本1.2.1的当前默认elasticsearch.yml文件:
# You can exploit these settings to design advanced cluster topologies. # # 1. You want this node to never become a master node, only to hold data. # This will be the "workhorse" of your cluster. # #node.master: false #node.data: true # # 2. You want this node to only serve as a master: to not store any data and # to have free resources. This will be the "coordinator" of your cluster. # #node.master: true #node.data: false # # 3. You want this node to be neither master nor data node, but # to act as a "search load balancer" (fetching data from nodes, # aggregating results, etc.) # #node.master: false #node.data: false