I've got a POC with Elasticsearch 6.4.0
5 Data Nodes
2 Coordinating nodes
1 Master Only Node
In these 5 data nodes, i've got two of them master elligible.
In elasticsearch.yml, discovery.zen.minimu_master_nodes is set to 2
The master node is master only (no data, no other role)
Flat network in one site
When the master only node is really the master, i tried to shutdown the two other master eligible data nodes.
In this case, the cluster becomes red, Kibana (connected to Coordinatiing nodes) does not update any status.
I can read in the elasticsearch log from the master that it complains "Not enough master nodes discovered during pinging"...
My questions are :
why the cluster cannot survive in this situation since i've got a master ?
In order to elect a master node, a majority of master-eligible nodes need to be available. When you shut down two of the three master-eligible nodes, the existing master no longer has mandate to stay as master, which is why the cluster goes red.
You can only handle immediate loss of as many nodes as you have replicas as one copy must be left in the cluster to recover from.
Yes, you can make all 5 nodes master-eligible and set minimum_master_nodes to 3 instead, which will allow you to handle 2 master-eligible nodes going down.
Increasing the number of replicas to 2 (3 shard copies) will also help you handle this better.
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.