Suppose I have a 3 dedicated master node and 4 data nodes. At a moment are all 3 acting as a master or is there a supreme master between them so that when it goes down another is elected as Supreme Master ?
Are 3 master acting together at one time with each controlling some primary shards? So when one goes down, another master will take its primary shards and that will be done by voting?
Thanks for the reply. But then what is the need to make a 3 node cluster. I can also make a 2 node cluster right, with one of my data nodes as voting node.
Also can you point me to an article where these things are explained?
You can make 3 if your data nodes master eligible and skip dedicated master nodes altogether and the cluster will still work. Having dedicated master nodes is usually recommended for large clusters and/or very busy clusters where e.g. load may lead to long GC or the current master node not having enough resources to complete tasks in a timely fashion.
Hi, suppose I have 2 dedicated master and 3 data nodes. One of the data nodes is also voting eligible.
Suppose m1 is active master.
If m1 and m2 loses communication, will m2 elect itself as master since data node can vote in master election process. Will this cause split brain?
Yes you are correct but I want to understand the reasons. Will voting only data node help in avoiding splitbrain if there are 2 dedicated masters?
M1 is active. Suppose m1 and m2 goes lose communication between them. How would the master election process proceed from here? M1 is already master and has connections to all data nodes. M2 thinks other master is dead so will try to elect itself as master right. So will the data node vote it and make it a second active master hence causing splitbrain Or voting only data nodes gets to vote only in case of tiebreaker?
You may configure one of your master-eligible nodes to be a voting-only node so that it can never be elected as the master node. For instance, you may have two dedicated master nodes and a third node that is both a data node and a voting-only master-eligible node. This third voting-only node will act as a tiebreaker in master elections but will never become the master itself.
It may seem confusing to use the term "master-eligible" to describe a voting-only node since such a node is not actually eligible to become the master at all. This terminology is an unfortunate consequence of history: master-eligible nodes are those nodes that participate in elections and perform certain tasks during cluster state publications, and voting-only nodes have the same responsibilities even if they can never become the elected master.
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.