# Understand Cluster HA functionality

**URL:** <https://discuss.elastic.co/t/understand-cluster-ha-functionality/58574>\
**Category:** Elasticsearch\
**Created:** [August 22, 2016, 12:16pm UTC](https://discuss.elastic.co/t/understand-cluster-ha-functionality/58574 "2016-08-22T12:16:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [August 22, 2016, 12:16pm UTC](https://discuss.elastic.co/t/understand-cluster-ha-functionality/58574/1 "2016-08-22T12:16:49Z")

</div>

hi Guys,

I need to understand such basic functionality of ES. I have 4 node elastic cluster which is having  
2 date node, 2 masters and 1 client node.

In client servers i use to run shell scripts and forwarding output to ES like,

curl -XPUT http://\<10.40.5.10\>:9200/myindex/linux/$time -d ' {..}

In case 10.40.5.10 node went down, is the data will automatically redirect to another data node? if it will not happen how can I overcome this?

Second thing, I want to create an index with same name for every 3 months. is there any configuration available in elasticsearch? bez the data is directly pushing from client servers to elastic.

Thanks in advance.  
Raje

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [August 22, 2016, 12:37pm UTC](https://discuss.elastic.co/t/understand-cluster-ha-functionality/58574/2 "2016-08-22T12:37:10Z")

</div>

> [@rajkumar3v](#):
>
> I have 4 node elastic cluster which is having2 date node, 2 masters and 1 client node.

If you are going to have dedicated master node you should have 3 of them and you should set [minimum master nodes](https://www.elastic.co/guide/en/elasticsearch/guide/2.x/important-configuration-changes.html#_minimum_master_nodes) to 2.

> [@rajkumar3v](#):
>
> In client servers i use to run shell scripts and forwarding output to ES like,
> 
> curl -XPUT http://\<10.40.5.10\>:9200/myindex/linux/$time -d ' {..}
> 
> In case 10.40.5.10 node went down, is the data will automatically redirect to another data node? if it will not happen how can I overcome this?

If 10.40.5.10 node goes down there won't be a process running on that server to do any redirecting of your request. Instead you should be making requests to Elasticsearch using one of the many [client libraries](https://www.elastic.co/guide/en/elasticsearch/client/index.html) in stead of using cURL. cURL should only be used as a tool for manual requests to Elasticsearch from the command line, your application should be using a proper client library. These client libraries will handle the case where a node is down for you and try the request on a different node.

> [@rajkumar3v](#):
>
> Second thing, I want to create an index with same name for every 3 months. is there any configuration available in elasticsearch? bez the data is directly pushing from client servers to elastic.

There is no configuration in elasticsearch that will specifically create 3-monthly indices, your ingest application will need to specify the correct index name for the three month period relevent to the batch of documents. Logstash could help here though as in Logstash you can set configuration to determine the index name for each docuemnt from a timestamp field in the document. Other things in Elasticsearch that could assist are [Index Templates](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-templates.html) and [Index Aliases](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html#indices-aliases)

You might find [this section](https://www.elastic.co/guide/en/elasticsearch/guide/current/time-based.html#time-based) (and surrounding sections) of the "Elasticsearch: The Definitive Guide" book useful to read given what you are trying to achieve.

---

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [August 22, 2016, 1:52pm UTC](https://discuss.elastic.co/t/understand-cluster-ha-functionality/58574/3 "2016-08-22T13:52:23Z")

</div>

Hi colings86,

Thanks for your quick reply, more than 100's of servers forwarding the custom script output to ES by using Curl which is placed inside script, so when the script is executed, Curl will push the output in JSON format to elastic through Nginx.

I am planing to go with Nginx for load balancing and its capable to manage HA of ES cluster.

else,

In logstash output we can specify more than 1 data node, can logstash able to manage data redirection between data nodes?

I do not want to stuck with any dependency on client servers and it will be painful for me to manage and troubleshoot when a problem arise.

Please give me your inputs.

---

<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, 10:26pm UTC](https://discuss.elastic.co/t/understand-cluster-ha-functionality/58574/4 "2017-07-05T22:26:10Z")

</div>


