# Simple Elasticsearch cluster with 2 data nodes

**URL:** <https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833>\
**Category:** Elasticsearch\
**Created:** [February 16, 2016, 3:16am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833 "2016-02-16T03:16:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [February 16, 2016, 3:16am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/1 "2016-02-16T03:16:11Z")

</div>

Hi all

I am struggling a bit with the ES 2.2 documentation on clustering. Seems like there are many ways of building ES clusters and lots of blog posts out there from different stages of this project's history but a bit hard to find what's a recommended, simple configuration.

I simply want 2 nodes in an active/active configuration that will be easy to scale out horizontally. The ability to auto-scale isn't a requirement. It is to be part of an ELK stack.

Many thanks,

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 16, 2016, 5:17am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/2 "2016-02-16T05:17:14Z")

</div>

Just start 2 nodes. Et voila !

But you should add a 3rd one as a Tie breaker in case of network loss and set minimum master node.

---

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [February 16, 2016, 5:22am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/3 "2016-02-16T05:22:47Z")

</div>

Any chance you could give me a hint on how to configure the nodes before I start them? I've inherited a configuration that's using the Zen Discovery module and it's all proving to be anything but easy.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 16, 2016, 5:48am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/4 "2016-02-16T05:48:35Z")

</div>

Basically you have to set network.host and the unicast list of nodes.

David.

---

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [February 16, 2016, 6:01am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/5 "2016-02-16T06:01:10Z")

</div>

I should have mentioned, this ES cluster is to be part of an ELK stack.

---

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [February 16, 2016, 6:51am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/6 "2016-02-16T06:51:22Z")

</div>

Thanks so much David.

I ended up with this:

```
---
cluster:
  name: es01
discovery:
  zen:
    ping:
      unicast:
        hosts:
             - data01.mydomain.com:9300
             - data02.mydomain.com:9300
http:
  enabled: true
index:
  gateway:
    type: none
  number_of_replicas: 1
  number_of_shards: 5
indices:
  fielddata:
    breaker:
      limit: 60%
    cache:
      size: 100%
network:
  host: 1.1.1.1
node:
  data: true
  master: true
  name: es01_data01
path:
  data: /srv/es
  logs: /var/log/elasticsearch/es01
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 16, 2016, 7:14am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/7 "2016-02-16T07:14:34Z")

</div>

Looks good. I'd simplify it though with:

```auto
cluster:
  name: es01
discovery:
  zen:
    ping:
      unicast:
        hosts:
             - data01.mydomain.com:9300
             - data02.mydomain.com:9300
network:
  host: 1.1.1.1
node:
  name: es01_data01
path:
  data: /srv/es
  logs: /var/log/elasticsearch/es01

```

---

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [February 16, 2016, 7:22am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/8 "2016-02-16T07:22:32Z")

</div>

Great, thanks again. I'll write yet another blog post and document all this when I'm finished!

---

<div class="post-metadata">

**Author:** ![Alex\_Harvey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_harvey/32/32183_2.png) [@Alex\_Harvey](https://discuss.elastic.co/u/Alex_Harvey)\
**Post date:** [February 17, 2016, 3:38am UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/9 "2016-02-17T03:38:15Z")

</div>

Is it possible to specify the same configuration in Logstash? If the version of logstash is 1.4.5? I ended up making the 1.4.5 choice because [Elastic.co](http://Elastic.co)'s Puppet module only supports Logstash 1.4.

---

<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, 11:15pm UTC](https://discuss.elastic.co/t/simple-elasticsearch-cluster-with-2-data-nodes/41833/10 "2017-07-05T23:15:53Z")

</div>


