# High availability with two servers

**URL:** <https://discuss.elastic.co/t/high-availability-with-two-servers/328467>\
**Category:** Elasticsearch\
**Created:** [March 24, 2023, 2:33pm UTC](https://discuss.elastic.co/t/high-availability-with-two-servers/328467 "2023-03-24T14:33:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amiraliw](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@amiraliw](https://discuss.elastic.co/u/amiraliw)\
**Post date:** [March 24, 2023, 2:33pm UTC](https://discuss.elastic.co/t/high-availability-with-two-servers/328467/1 "2023-03-24T14:33:53Z")

</div>

I have only two servers, how I should configure elasticsearch nodes to get high availability and avoid split-brain?  
should I only have one node on each server?

---

<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 24, 2023, 2:39pm UTC](https://discuss.elastic.co/t/high-availability-with-two-servers/328467/2 "2023-03-24T14:39:10Z")

</div>

Version 7.0 and above automatically manages the quorum size, so you do not risk suffering from split-brain scenarios due to misconfiguration as in earlier versions. As Elasticsearch requires a strict majority of master-eligible nodes to be available in order to elect a master [you can not achieve high-availability with only 2 servers](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/high-availability-cluster-small-clusters.html). For high availability you need at least 3 servers and nodes.

---

<div class="post-metadata">

**Author:** ![amiraliw](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@amiraliw](https://discuss.elastic.co/u/amiraliw)\
**Post date:** [March 24, 2023, 2:42pm UTC](https://discuss.elastic.co/t/high-availability-with-two-servers/328467/3 "2023-03-24T14:42:11Z")

</div>

Thank you for the answer @Christian_Dahlqvist

How about to have two nodes on one server and the third one on another server?

---

<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 24, 2023, 2:43pm UTC](https://discuss.elastic.co/t/high-availability-with-two-servers/328467/4 "2023-03-24T14:43:53Z")

</div>

> [@amiraliw](#):
>
> How about to have two nodes on one server and the third one on another server?

In that case you can handle the server with only one node going down and still have a functioning cluster. If the cluster with two nodes however goes down you no longer have an available cluster.

A common way to get around this is to find a small third host and install a dedicated master node there. This does not hold data and use limited resouces, leaving the two larger servers to do all the work. You can nowadays even configure this to be voting-only, which somewhat relaxes latency requirements.

---

<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:** [April 21, 2023, 2:44pm UTC](https://discuss.elastic.co/t/high-availability-with-two-servers/328467/5 "2023-04-21T14:44:39Z")

</div>

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