# Multi Master configuration

**URL:** https://discuss.elastic.co/t/multi-master-configuration/188612
**Category:** Elasticsearch
**Created:** [July 3, 2019, 5:49am UTC](https://discuss.elastic.co/t/multi-master-configuration/188612 "2019-07-03T05:49:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![stalinbritto](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@stalinbritto](https://discuss.elastic.co/u/stalinbritto)
#### Post date: [July 3, 2019, 5:49am UTC](https://discuss.elastic.co/t/multi-master-configuration/188612/1 "2019-07-03T05:49:25Z")

</div>

Hi Team,

I'm currently trying to configure an elastic search cluster with 2 masters and 3 data nodes  
My cluster is working 1 Master and 3 data Node.

root@ELK-Master1:~# curl [http://IP:9200/\_cat/nodes?v](http://IP:9200/_cat/nodes?v)  
ip heap.percent ram.percent cpu load\_1m load\_5m load\_15m node.role master name  
host1 24 8 0 0.00 0.00 0.00 di - ELK-Slave1  
host2 14 8 0 0.00 0.00 0.00 di - ELK-Slave3  
host3 29 8 0 0.03 0.01 0.00 di - ELK-Slave2  
Master1 14 13 47 3.77 3.68 2.61 mdi \* ELK-Master1

But the second Master couldn't add into Master 1.

**Master1 elasticsearch.yaml:**  
cluster.name: PreProd-Cluster  
node.name: ELK-Master1  
node.master: true  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: Master1  
http.port: 9200  
discovery.seed\_hosts: ["Master1, Master2"]  
cluster.initial\_master\_nodes: ["Master1, Master2"]

**Master2 elasticsearch.yaml:**  
cluster.name: PreProd-Cluster  
node.name: ELK-Master1  
node.master: true  
path.data: /var/lib/elasticsearch  
path.logs: /var/log/elasticsearch  
network.host: Master1  
http.port: 9200  
discovery.zen.minimum\_master\_nodes: 2  
discovery.seed\_hosts: ["Master1, Master2"]  
cluster.initial\_master\_nodes: ["Master1, Master2"]

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [July 3, 2019, 6:06am UTC](https://discuss.elastic.co/t/multi-master-configuration/188612/2 "2019-07-03T06:06:27Z")

</div>

Elasticsearch is operates in a clustered mode and is not a master-slave system as indicated by your node names. As it relies on consensus algorithms, you should always aim to have at least 3 master-eligible nodes in your cluster. Having 2 master eligible nodes in a cluster is a bad idea as the cluster will be in a red state if any of them go down as there is no majority available to elect a new master.

As you are on the latest version I believe you simply leave the current single master node in the config and then add the new master eligible node(s).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 31, 2019, 6:18am UTC](https://discuss.elastic.co/t/multi-master-configuration/188612/3 "2019-07-31T06:18:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
