ES中discovery.seed_hosts和cluster.initial_master_nodes是什么意思

Tom*_*Tom 11 elasticsearch

我正在使用 ES 7.10.1,并且正在阅读https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#unicast.hosts

我有5个主节点(node.master: true node.data: false)和20个数据节点(node.master: false node.data: true)

我有以下四个问题:

  1. discovery.seed_hosts 和都应该cluster.initial_master_nodes与节点一起指定吗master?我的意思是,我可以为这两种配置指定数据节点吗?

  2. 由于我的案例有 5 个主节点,因此我应该为这两种配置指定多少个节点。我想我不必在这些配置中列出所有这 5 个节点?

  3. 在我看来,这discovery.seed_hosts就像旧版本的弹性搜索 discovery.zen.ping.unicast.hosts

  4. 在我看来,这cluster.initial_master_nodes就像旧版本的弹性搜索discovery.zen.minimum_master_nodes

谢谢!

lle*_*aly 10

  1. 建议至少在 3 个主节点中添加该设置,以实现容错。
  2. 我会把 5 个都放上以避免混淆
  3. 是的,但仍然适用于遗产
  4. 是的,但仍然适用于遗产

请记住,cluster.initial_master_nodes 在集群引导后使用一次,然后将被忽略,建议从配置中将其删除。

集群引导

集群设置

简而言之discovery.seed_hosts,是新节点用于加入集群的主节点列表,也是cluster.initial_master_nodes引导集群的初始列表。

  • 为了详细说明第四个问题,我想补充一下,在版本 7.0 中删除了 `discovery.zen.minimum_master_nodes` 设置,请参阅(https://www.elastic.co/blog/a-new-era-for-cluster-coordination-in- elasticsearch ) 以获得详细解释。 (2认同)