minimum_master_nodes = 2 with 3 master eligible nodes -> if only one node is online then nothing will work

AArias

I have 3 master eligible nodes and, as per Elasticsearch documentation, to avoid the split brain issue I set minimum_master_nodes to 2.

But that means that if a catastrophe occurs and only one node survives or comes back online, then the cluster will remain inoperative as it won't find enough quorum to elect a master.

Is this solvable with some setting so that the last standing node will form a cluster with itself or do I always need to guarantee at least two nodes are online with my current set up?

Val

If you have two out of your three master eligible nodes that are out of service, then you probably have other issues to worry about than operating your cluster.

The odds that 2/3 master nodes go down should be very low. But if you feel you can't guarantee that condition in your cluster, you might want to increase to 5 master-eligible nodes and set minimum_master_nodes = 3, which would increases the chances of keeping your cluster up.

With three master-eligible nodes, I wouldn't worry too much about that condition, but if you really need to, you could come up with some cron'ed shell script that would check the number of master nodes and if it falls below 2, then you could simply dynamically change the number of minimum master nodes back to 1:

# retrieve the number of master nodes
MASTER_COUNT=$(curl -s 'localhost:9200/_cat/master' | wc -l)

# if we have less than two masters, change the setting
if [ "$MASTER_COUNT" < 2 ]; then
   curl -XPUT localhost:9200/_cluster/settings -d '{
      "transient": {
        "discovery.zen.minimum_master_nodes": 1
      }
   }'
fi

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to determine number of eligible master nodes for Elasticsearch?

Akka cluster with one master node, worker nodes and non cluster client nodes

ConnectionString for connecting 3 master nodes to MySQL

discovery.zen.minimum_master_nodes value for a cluster of two nodes

Are the master and worker nodes the same node in case of a single node cluster?

Jenkins with only master node?

Odd Number of master nodes

Defining master nodes in elasticsearch

SLURM and python, nodes are allocated, but the code only runs on one node

Spark: Why execution is carried by a master node but not worker nodes?

Spark worker nodes unable to access file on master node

Jenkins - How to run one housekeeping job on all nodes (slaves + master)

Cassandra 3 nodes cluster throwing NoHostAvailableException as soon as one node is down

Kubernetes Cluster master/ Worker Nodes

Add multiple nodes to Jenkins master

Restarting master and losting pods on nodes

node joined successfully to master node, but got error when kubectl get nodes "The connection to the server localhost:8080 was refused"

AWS EMR with Task Nodes only for S3/EMRFS-only processing and 1 Core Node

How I guarantee I create only one new unique node between two existing nodes in a transaction

XPath to select nodes which don't only have one certain child node?

MySQL Master/Master replication working only one way

How to deploy specific pod to all nodes including master, but only for specific pod

does fileExists work on slaves or only on master?

How to get a list of all Jenkins nodes assigned with label including master node?

Apache spark slave nodes don't connect to master node but workers do start

After restarting the master node of Apache IoTDB, what should I do for the belonging nodes?

Hadoop use only master node for processing data

How to combine node values from different nodes into one node separated with a "/" every 2 values

XML: Get only some child nodes of a node