# Elasticsearch two node cluster

**URL:** https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101
**Category:** Elasticsearch
**Created:** [May 11, 2020, 7:12pm UTC](https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101 "2020-05-11T19:12:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [May 11, 2020, 7:12pm UTC](https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101/1 "2020-05-11T19:12:11Z")

</div>

Hi All,

We have been ended up setting a 2 node elasticsearch cluster due to certain issues.

As i'm aware there will be a possible split brain issue or HA failure issue.

Can someone give me a better advice on how to tackle this situation, i'm collecting data from three different data sources (monitoring tools, ITSM tools, application monitoring tools)

Please help me with your suggestions.

Thanks  
Gautham

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [May 11, 2020, 7:22pm UTC](https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101/2 "2020-05-11T19:22:50Z")

</div>

> [@Gauti](#):
>
> We have been ended up setting a 2 node elasticsearch cluster due to certain issues.
> 
> As i'm aware there will be a possible split brain issue or HA failure issue.

On Elasticsearch 7.x the quorum is automatically configured so you should not hit any split brain issue.

On Elasticsearch 6.x you should not have the split brain issue if:

- you have only one master eligible node and the minimum master nodes is set to 1
- both nodes are master eligible and the minimum master nodes is set to 2

The problem is with 2 master eligible nodes the cluster will become read only as soon as one of the nodes is disconnected.

The problem with 1 master eligible node is the cluster will become read only as soon as the master nodes is disconnected.

Meaning you cannot perform a rolling restart and you'll always have downtime when in maintainance.

If you can afford a small additional instance, you could setup a 3 nodes cluster, where the third node is a master voting only node and the other 2 nodes are master eligible & data nodes. The master voting only node will not store data and participate only to the master election, allowing you to perform a rolling restart.

---

<div class="post-metadata">

### Author: ![Gauti](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gauti](https://discuss.elastic.co/u/Gauti)
#### Post date: [May 11, 2020, 7:29pm UTC](https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101/3 "2020-05-11T19:29:50Z")

</div>

@Luca_Belluccini we are using elasticsearch 7.6.2 . so it means i dont need to worry about split brain?

How do i configure my nodes? Should i gohead with the default configuration in the system or should i need to add "node.data: true" or "node.master: true" to the nodes?

Please suggest.

Thanks  
Gautham

---

<div class="post-metadata">

### Author: ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)
#### Post date: [May 11, 2020, 10:49pm UTC](https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101/4 "2020-05-11T22:49:14Z")

</div>

> [@Gauti](#):
>
> @Luca_Belluccini we are using elasticsearch 7.6.2 . so it means i dont need to worry about split brain?

You have to pay attention to not stop too many master eligible nodes at the same time.  
Check [this blog post](https://www.elastic.co/blog/a-new-era-for-cluster-coordination-in-elasticsearch) and [our documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/modules-discovery-quorums.html#modules-discovery-quorums).

> [@Gauti](#):
>
> How do i configure my nodes? Should i gohead with the default configuration in the system or should i need to add "node.data: true" or "node.master: true" to the nodes?

All nodes are by default master eligible & data nodes.  
To know how to change the roles of the nodes, if necessary, please check [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/modules-node.html).  
E.g. for a voting only node, with no data, you need a `basic` license.  
The configuration would be:

```auto
node.master: true 
node.voting_only: true 
node.data: false 
node.ingest: false 
cluster.remote.connect: false 

```

* * *

If your company policy allows access to a remote cluster on the Cloud, I also invite you to try out [Elastic Cloud 14-days trial](https://www.elastic.co/cloud/elasticsearch-service/signup).

---

<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: [June 8, 2020, 10:49pm UTC](https://discuss.elastic.co/t/elasticsearch-two-node-cluster/232101/5 "2020-06-08T22:49:15Z")

</div>

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