# How many ES nodes for 2 hardware servers

**URL:** <https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598>\
**Category:** Elasticsearch\
**Created:** [November 30, 2016, 11:00am UTC](https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598 "2016-11-30T11:00:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![avdelst](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@avdelst](https://discuss.elastic.co/u/avdelst)\
**Post date:** [November 30, 2016, 11:00am UTC](https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598/1 "2016-11-30T11:00:21Z")

</div>

Hi all,

When I have to server, each running multiple VM's what would be the correct number of ES nodes ?

The goal is to still have a functoning ES cluster even when 1 server completely dies due to a hardware failure.

Currently I have the following setup but something tells me ES would not survive a sudden los of one of the hosts:

Server A: ES01 , ES02  
Server B: ES03, ES04

ES01,2,3,4 form a ES cluster where most settings are default.

Should I configure settings for number of replicas so that there's always a complete replica of the data on both of the hosts ?

Or is the best option to add another server and have 1 ES node per 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:** [November 30, 2016, 11:20am UTC](https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598/2 "2016-11-30T11:20:50Z")

</div>

If you want the cluster to be able to continue operating fully when one full server is lost you will need a third server, as you will need 3 master eligible nodes on different hosts.

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [November 30, 2016, 11:24am UTC](https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598/3 "2016-11-30T11:24:04Z")

</div>

I think you should at least configure allocation awareness [1], in order to prevent both primary and replica shards to be allocated to the same physical server.

Whether you should have a single node per physical machine depends on how much jvm heap you configure per node. I would say if you need more than 26GB then you should have more than a single node [2], but this depends. Ideally you shouldn't need that much heap, as since ES 5 many data structures are not kept in the jvm heap, but in the OS' filesystem cache.

It would also be better, if you add a third physical server to your cluster, so you can set the `minimum_master_nodes` setting to avoid split brains [3].

1: [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/allocation-awareness.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/allocation-awareness.html)  
2: [https://www.elastic.co/blog/a-heap-of-trouble](https://www.elastic.co/blog/a-heap-of-trouble)  
3: [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-node.html#split-brain](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-node.html#split-brain)

---

<div class="post-metadata">

**Author:** ![avdelst](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@avdelst](https://discuss.elastic.co/u/avdelst)\
**Post date:** [November 30, 2016, 11:45am UTC](https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598/4 "2016-11-30T11:45:31Z")

</div>

thanks everyone for all the replies.  
I'll look into a 3rd server and I'll also have a look at allocation-awareness if i can't get a 3rd server.

---

<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:** [December 28, 2016, 11:45am UTC](https://discuss.elastic.co/t/how-many-es-nodes-for-2-hardware-servers/67598/5 "2016-12-28T11:45:55Z")

</div>

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