# Two node cluster elasticsearch

**URL:** https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901
**Category:** Elasticsearch
**Created:** [October 27, 2023, 9:42am UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901 "2023-10-27T09:42:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![admin365](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@admin365](https://discuss.elastic.co/u/admin365)
#### Post date: [October 27, 2023, 9:42am UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901/1 "2023-10-27T09:42:31Z")

</div>

hello,

I've set up a cluster with two Elasticsearch nodes, but when the primary node fails, the secondary node doesn't automatically assume the role of the master. So, my question is, should I configure the secondary node as the master manually when the primary node goes down, or is it supposed to happen automatically? I suspect that it's not feasible with two nodes. So my question do you think setting it manually will be a solution or also not feasible.

Do you have any idea ?  
Thanks in advance

---

<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: [October 27, 2023, 10:05am UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901/2 "2023-10-27T10:05:04Z")

</div>

In order to have a highly available cluster that can handle the failure of one node [you need at least 3 master eligible nodes](https://www.elastic.co/guide/en/elasticsearch/reference/8.10/high-availability-cluster-small-clusters.html). You can not achieve this with just 2 nodes.

---

<div class="post-metadata">

### Author: ![admin365](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@admin365](https://discuss.elastic.co/u/admin365)
#### Post date: [October 27, 2023, 10:09am UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901/3 "2023-10-27T10:09:08Z")

</div>

So do you think trying to set the second node manually as master it will not be a good solution ?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [October 27, 2023, 1:17pm UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901/4 "2023-10-27T13:17:51Z")

</div>

> [@admin365](#):
>
> So do you think trying to set the second node manually as master it will not be a good solution ?

With two node cluster you can have only one master, if the master goes down you need to bring it up, there is no solution to this.

If you want a high available cluster you need at least 3 nodes, you can not do that with 2 nodes.

---

<div class="post-metadata">

### Author: ![admin365](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@admin365](https://discuss.elastic.co/u/admin365)
#### Post date: [October 27, 2023, 1:30pm UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901/5 "2023-10-27T13:30:31Z")

</div>

Thank you!!

---

<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: [November 24, 2023, 1:31pm UTC](https://discuss.elastic.co/t/two-node-cluster-elasticsearch/345901/6 "2023-11-24T13:31:03Z")

</div>

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