当一个集群中包含多个节点,集群自动分配shards副本,当所有primary和replica shards被激活,集群状态变为green
添加新节点的步骤:
1.创建一个新实例
2.配置cluster.name
3.启动实例,节点自动发现并加入指定集群
节点分类:
master-eligible node
node.master
创建和删除索引,shard分配,跟踪节点状态
date node
node.data
ingest node
node.ingest
machine learning node
xpack.ml.enabled
node.ml
coordinating node
node.master: false
node.data: false
node.ingest: false
每一个节点都是一个隐式协调节点,无法关闭
请求处理分为两个阶段,分发处理,和结果聚合
分发处理:协调节点分发请求到各个数据节点进行处理
结果聚合:数据节点把处理结果返回给协调节点,并合成一个全局单一结果集
master-eligible:
创建、删除索引,探测跟踪节点状态,数据分片路由
稳定的存储和网络低延时
node.master: true
node.voting_only: false #default false
node.data: false
node.ingest: false
node.ml: false
xpack.ml.enabled: true
cluster.remote.connect: false #default true
voting_only :进行选举和集群状态更新发布,不能被选举为master,不支持oss-distribution
稳定的存储和网络低延时
node.master: true
node.voting_only: true
node.data: false
node.ingest: false
node.ml: false
xpack.ml.enabled: true
cluster.remote.connect: false
data node: CRUD, 查询, and 聚合. These operations are I/O-, memory-, and CPU- intensive
node.master: false
node.voting_only: false
node.data: true
node.ingest: false
node.ml: false
cluster.remote.connect: false
ingest node
node.master: false
node.voting_only: false
node.data: false
node.ingest: true
node.ml: false
cluster.remote.connect: false
coordating node
node.master: false
node.voting_only: false
node.data: false
node.ingest: false
node.ml: false
cluster.remote.connect: false
changing the role of a node
data node 维护如下数据:
shard data for every shard allocated to that node
index metadata corresponding with every shard allocated to that node
the cluster-wide metadata, such as settings and index templates
master-eligible node 维护如下数据:
the index metadata for every index in the cluster
the cluster-wide metadata, such as settings and index templates.
node.data ->false
node.master & node.data -> false
data path可以被多个节点(实例)共享,然而推荐每个节点使用单独data path
es 8将会移除改特性
node.max_local_storage_nodes