Reputation: 21
I had configured the elasticsearch server with 3 nodes in a cluster. All the 3 nodes are Master eligible nodes and Data Nodes (i.e, node.master:true
and node.data:true
for all the 3 nodes).
Can anyone please tell me, will there be any impact when setting all the available nodes as master nodes and data nodes?
Is there any rule or formula to determine the number of master-eligible node and data node depending on the total number of nodes? ( ex: if the total number of nodes = 3
, then master nodes should be x
and data node should be y
- and the question is what is x
and y
here? ).
Upvotes: 2
Views: 3139
Reputation: 1691
tl;dr: x = 3, y = 3.
In the case of a three node cluster, having one master gives little resiliency and having two wouldn't be any better, as you'd still need both to have a quorum (to avoid a split brain).
Quorum: N/2+1, where N is the number of master-eligible nodes, so in this case: 2/2+1 = 2.
So three master-eligible nodes is a good option for a three node cluster.
I suggest keeping all three as data nodes too. Splitting roles between nodes isn't normally required until you start getting into larger clusters (10+ nodes).
Further reading: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html
Upvotes: 2