创建master + data和client + data的单独elasticsearch节点

 捕鱼达人2502940243 发布于 2023-01-08 18:28

我们目前拥有一个强大的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" 

我一直在寻找无济于事.有没有正确的方法来实现这一目标?

1 个回答
  • 我将跳过使用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
    

    2023-01-08 18:30 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有