Elasticsearch集群rpm包部署
规划主机
主机IP | 主机名 | 系统 |
172.17.10.101 | elk101.guoguod.cn | CentOS7 |
172.17.10.102 | elk102.guoguod.cn | CentOS7 |
172.17.10.103 | elk103.guoguod.cn | CentOS7 |
1.下载
2.安装
以下操作三台主机都需要执行
3.启动
修改配置文件
对172.17.10.101主机进行操作
将配置文件传给另外两台节点
以下操作三台主机都需要执行
创建存放数据目录和日志目录
设置开机自启并启动
4.集群验证
验证客户端
查看集群状态
es集群启动后会先启动9300端口,内部做选举选出master然后启动9200端口号进行服务
es集群当半数以上存活才能对外提供服务,比如3个节点组成的集群,2台故障es就停止对外提供服务 四个节点组成的集群,3台故障es就停止对外提供服务
因为防止脑裂,集群半数以上通过投票,整个对外提供服务,新加入的节点也能对外提供服务
Elasticsearch集群需要半数以上节点存活才能确保集群健康和正常对外提供服务,以维护数据一致性和避免脑裂问题。
什么是脑裂?
脑裂是指在高可用性系统中,由于通信故障导致集群被错误地划分为多个子集群,每个子集群都认为自己是合法的代表,从而引发数据不一致和服务冲突的状态。