# 3 nodes cluster schema / Split Brain

**URL:** <https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154>\
**Category:** Elasticsearch\
**Created:** [October 28, 2015, 2:13pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154 "2015-10-28T14:13:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zokratez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zokratez/32/5974_2.png) [@zokratez](https://discuss.elastic.co/u/zokratez)\
**Post date:** [October 28, 2015, 2:13pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154/1 "2015-10-28T14:13:28Z")

</div>

Hi!

I want to know if with this current schema I'm safe from split brain error...

Node1: master and data  
Node2: slave and data  
Node3: dedicated master

Node1 unicast point to Node2  
Node2 unicast point to Node3  
Node3 unicast point to Node1

Node1:

```
cluster.name: elasticsearch
node.name: "node1"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node2"]
discovery.zen.minimum_master_nodes: 2

```

Node2:

```
cluster.name: elasticsearch
node.name: "node2"
node.master: false
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node3"]
discovery.zen.minimum_master_nodes: 2

```

Node3:

```
cluster.name: elasticsearch
node.name: "node3"
node.master: true
node.data: false
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1"]
discovery.zen.minimum_master_nodes: 2

```

The node api show:

> node1 127.0.0.1 43 16 9.64 d m node1  
> node3 127.0.0.1 6 11 0.15 - \* node3  
> node2 127.0.0.1 38 38 1.95 d - node2

And all the indices are green.

Anyway... It this configuration a risk to my cluster? Can be better?

Thanks!

---

<div class="post-metadata">

**Author:** ![lwintergerst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwintergerst/32/18164_2.png) [@lwintergerst](https://discuss.elastic.co/u/lwintergerst)\
**Post date:** [October 28, 2015, 2:16pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154/2 "2015-10-28T14:16:28Z")

</div>

You wont get the split brain problem.

But running with 2 masters is just as bad as running with just 1.

If one of your master nodes fails, the "minimum master node: 2" will make the other nodes unable to form a cluster.

i would suggest using three master nodes and leaving the minimum setting as it is.

I would also recommend to include all nodes in the unicast.host config

---

<div class="post-metadata">

**Author:** ![zokratez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zokratez/32/5974_2.png) [@zokratez](https://discuss.elastic.co/u/zokratez)\
**Post date:** [October 28, 2015, 2:37pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154/3 "2015-10-28T14:37:14Z")

</div>

Thank you for the tip. I change the config to:

Node1:

```
cluster.name: elasticsearch
node.name: "node1"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost", "node2", "node3"]
discovery.zen.minimum_master_nodes: 2

```

Node2:

```
cluster.name: elasticsearch
node.name: "node2"
node.master: true
node.data: true
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["localhost", "node1", "node3"]
discovery.zen.minimum_master_nodes: 2

```

Node3:

```
cluster.name: elasticsearch
node.name: "node3"
node.master: true
node.data: false
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1", "node2", "localhost"]
discovery.zen.minimum_master_nodes: 2

```

Is necessary put self host as localhost into unicast host array list?

---

<div class="post-metadata">

**Author:** ![lwintergerst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwintergerst/32/18164_2.png) [@lwintergerst](https://discuss.elastic.co/u/lwintergerst)\
**Post date:** [October 28, 2015, 4:50pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154/4 "2015-10-28T16:50:48Z")

</div>

No, i think you can leave out the localhost. But all other nodes are important.

Looks good to me 🙂

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 28, 2015, 9:48pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154/5 "2015-10-28T21:48:53Z")

</div>

You're better off having all 3 as master eligible and keeping min masters at 2.  
Cause if you lose one master node now, your cluster will be unavailable.

---

<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 5, 2017, 11:42pm UTC](https://discuss.elastic.co/t/3-nodes-cluster-schema-split-brain/33154/6 "2017-07-05T23:42:00Z")

</div>


