Hi, a little confused reading the documentation on creating a cluster https://www.elastic.co/guide/en/elasticsearch/reference/7.17/high-availability-cluster-small-clusters.html#high-availability-cluster-design-two-nodes
- Regarding "two-nodes clusters", the documentation says
If you have two nodes, we recommend they both be data nodes
Recommendation to use 2 date nodes, next paragraph:
We recommend you set node.master: false on one of your two nodes so that it is not master-eligible. This means you can be certain which of your nodes is the elected master of the cluster. The cluster can tolerate the loss of the other master-ineligible node. If you don’t set node.master: false on one node, both nodes are master-eligible. This means both nodes are required for a master election. Since the election will fail if either node is unavailable, your cluster cannot reliably tolerate the loss of either node.
There are 2 nodes (node1 and node2), one should preferably be a master, for example, there is (as stated in the documentation, if roles are explicitly specified, then only they will be assigned) node1 - roles (master - true, date - true), node2 - roles (master - false, date - true), questions:
- If node1 fails, does the cluster stop or node2 becomes the master?
- Node2 fails, node1 takes over all traffic?
Next paragraph
We recommend you assign both nodes all other roles except master eligibility.
I didn’t understand a bit, in the case of a two-nodes cluster, should I use 2 date nodes, 1 master node and one non-master node, or put everything except the master?
And one more thing, regarding "Two-node clusters with a tiebreaker", adding to the two masters one more "dedicated voting-only master-eligible node" in case of failure of the first master, the second will take its place, and the third ("tiebreaker" ) will just be used for voting, but he will never become a master himself?