# Need more clarity and understanding on Split brain problem?

**URL:** <https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184>\
**Category:** Elasticsearch\
**Created:** [June 17, 2016, 6:56pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184 "2016-06-17T18:56:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [June 17, 2016, 6:56pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/1 "2016-06-17T18:56:33Z")

</div>

Hi Experts,

I have 4 node cluster that is 2 servers and each server has 2 nodes . I have default config for all the four nodes that is  
master node:true  
data node:true

So my first query would be is there any possibility that I can face Split brain problem in this architecture(as per my understanding I will never because I have 4 nodes and anyone can be elected as master).  
Second query would be is it necessary to have a dedicated master node , if yes then per cluster 1 master node i or per cluster 2 master node is the good selection ?

Thanks  
VG

---

<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:** [June 17, 2016, 7:38pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/2 "2016-06-17T19:38:42Z")

</div>

The critical factor with respect to split-brain scenarios is not necessarily how many master eligible nodes you have but rather that you have set `minimum_master_nodes` to an appropriate value. As Elasticsearch is a consensus based system, it is important that a majority of master eligible nodes agree when a master node is elected. If this was not the case two parts of the cluster could end up electing different master nodes, causing a split-brain scenario.

In order to prevent this you should set `minimum_master_nodes` to `FLOOR((2/N) + 1)` assuming there is more than 1 master eligible node. If you have 4 master eligible nodes it should therefore be set to 3.

Having a single master eligible node eliminates the risk of split-brain scenarios, but also does not allow the cluster to continue operating properly if this node goes down.

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [June 17, 2016, 7:43pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/3 "2016-06-17T19:43:09Z")

</div>

thanks Chris,  
so what is your suggestion on

> Second query would be is it necessary to have a dedicated master node , if yes then per cluster 1 master node or per cluster 2 master node is the good selection ?

---

<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:** [June 17, 2016, 8:28pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/4 "2016-06-17T20:28:28Z")

</div>

You can have all 4 nodes be master eligible and set `minimum_master_nodes` to 3. This will allow the cluster to continue operate even if you lose one node, e.g. through crash or maintenance.

---

<div class="post-metadata">

**Author:** ![Ant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ant/32/33267_2.png) [@Ant](https://discuss.elastic.co/u/Ant)\
**Post date:** [March 2, 2017, 5:53pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/5 "2017-03-02T17:53:01Z")

</div>

Chris,

I have one node at the moment but I'm looking to add a second for both performance and and redundency benfits. In that instance how should I manage it? if I set the minimum master nodes to 2 then both need to be up so do I loose the redundency?

I know getting a 3rd node would be ideal but I don't think I can get the budget approval for that at the moment.

Many thanks for your help

---

<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:** [March 2, 2017, 6:25pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/6 "2017-03-02T18:25:34Z")

</div>

If you have 2 nodes, minimum\_master\_nodes should be set to 2. This means that if one node goes down or the two nodes are partitioned off, you will be able to search but not index any more documents. If you need high write availability, you need 3 nodes, but that can be two master/data nodes and a small, dedicated master node.

---

<div class="post-metadata">

**Author:** ![Ant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ant/32/33267_2.png) [@Ant](https://discuss.elastic.co/u/Ant)\
**Post date:** [March 4, 2017, 5:26pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/7 "2017-03-04T17:26:23Z")

</div>

I thought that might be the solution but wasn't sure of the implications, that helps a lot, thank you!

---

<div class="post-metadata">

**Author:** ![Ant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ant/32/33267_2.png) [@Ant](https://discuss.elastic.co/u/Ant)\
**Post date:** [March 4, 2017, 5:36pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/8 "2017-03-04T17:36:31Z")

</div>

one more thing actually, you menation a small master node? do I take it from that I can introduce a node which is only there to manage indexes and doesn't hold any of the data shards itself? I ask as this would be a viable solution for me as I could depoloy a VM on our hyperV to do this role until we had the business need for a 3rd physical box in the cluster, I can't run a VM that takes the data shards though as it would put to much load on the shared NIC and disk pack.

---

<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, 10:02pm UTC](https://discuss.elastic.co/t/need-more-clarity-and-understanding-on-split-brain-problem/53184/9 "2017-07-05T22:02:37Z")

</div>


