Why doesn't elect master node?

Hi.

I created a Elasticsearch cluster with 2 servers.
Elasticsearch Cluster version is 7.6.2.
Each server has three master nodes.

I am currently doing a failover test.
First, if you kill server 1 that has a master node, the master node is elected from server 2.
Second, if you restart server 1 and kill server 2, the master node is not elected from server 1.
I want to know why the Masternode is not elected from the second.

Thank you.

What node on what server is elected?

If you have a total of 6 master eligible nodes a strict majority of these (4) need to be available to elect a master. You can therefore not have a highly available cluster with just 2 servers. If any of the servers went down I would expect no master to be elected. If you are seeing anything different you may have some incorrect configuration somewhere or missing a node from your cluster.

Thank you.
To configure a high availability cluster with 2 servers, how do you configure the nodes on each server?

No master node was elected anywhere.

You can not do that. A minimum of 3 servers are required.

The server I said means one os.
That is, there are three master nodes in one os.
The cluster consists of 2 os (server), each with 3 master nodes.

In the same sense (1 server = 1 os), is it correct to say that you need 3 servers?

In order to be able to take down a full host/server you need a minimum of 3. If you take down one out of two servers you lose half the nodes which does not allow a majority to be formed.

The third server can however be smaller as it only needs to hold a single small dedicated master node.

Ok. I understand.
I'll try what you said. Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.