I have setup elasticsearch cluster with two node. I need to use this as high availability cluster. Currently logstash is sending data to master node and it gets replicate to slave node.
However if Master node goes does data is not sent to other node. Could you please help in this.
Elasticsearch is a clustered system, not a master-slave architecture. If you only have two nodes in your Elasticsearch cluster, you can therefore not have highly available setup. If only one of the nodes is master eligible, losing this will cause the cluster to stop accepting writes. The same is the case if both nodes are master eligible as a single node does not form a majority and therefore can not elect a master.
In order to have a highly available cluster that can tolerate one node going down, you need a minimum of 3 master-eligible nodes.
I would recommend that you set up three nodes with the default master/data configuration (is master-eligible and holds data). You will need to set minimum_master_nodes to 2 and make sure they can find each other by adding all nodes to the discovery.zen.ping.unicast.hosts list.
The Logstash elasticsearch output should then have all these nodes listed in order top be able to balance load and fail over if needed.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.