# Correct way to send data to ES cluster

**URL:** <https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102>\
**Category:** Elasticsearch\
**Created:** [April 12, 2017, 7:10am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102 "2017-04-12T07:10:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [April 12, 2017, 7:10am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/1 "2017-04-12T07:10:07Z")

</div>

Hi,

How to send logs to the ES if I have 1 master node and two data nodes? Should I send all logs to master or all to data or it doesnt matter?

(I was unable to see such information in the master/data [node manual](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html))

I also saw the [logstash -\> output-plugins -\> ElasticSearch](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-hosts). It write there:

> It is important to exclude dedicated master nodes from the hosts list to prevent LS from sending bulk requests to the master nodes. So this parameter should only reference either data or client nodes in Elasticsearch.

Does this mean not to send the logs to the data node?

---

<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:** [April 12, 2017, 11:54am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/2 "2017-04-12T11:54:03Z")

</div>

Don't run with a single master node as that will be a single point of failure. Make you two data nodes master eligible too so that you have three master eligible nodes in he cluster. Make sure you update `minimum_master_nodes` to 2 and then send all requests to the master/data nodes.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [April 18, 2017, 6:47am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/4 "2017-04-18T06:47:09Z")

</div>

Thanks!  
If I make the data nodes as master eligible, do I need also to create a new master only node? (I rather not, since I am working on a project that is lagging behind).

From my understanding I could send from lets say the logstash to the master and data nodes with no difference.

---

<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:** [April 18, 2017, 6:59am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/5 "2017-04-18T06:59:28Z")

</div>

You should always aim to have 3 master eligible nodes, so do not remove the dedicated master node. This allows Elasticsearch to elect a master even if one node is unavailable, which it is not if there are only 2 nodes in the cluster.

---

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [April 18, 2017, 7:29am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/6 "2017-04-18T07:29:43Z")

</div>

Perfect thanks!

Just to make sure so I send my logs to the data nodes (that are also master eligible) but not to send logs to the master only node?

---

<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:** [April 18, 2017, 7:30am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/7 "2017-04-18T07:30:20Z")

</div>

Exactly.

---

<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:** [May 16, 2017, 7:44am UTC](https://discuss.elastic.co/t/correct-way-to-send-data-to-es-cluster/82102/8 "2017-05-16T07:44:42Z")

</div>

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