Yehosef
Yehosef

Reputation: 18657

Do we need a separate master node with a small elasticsearch cluster?

We are considering a two/three node elasticsearch cluster. For this application, we are concerned mainly with scalability, not reliability (it's for back office analytics).

Is there an advantage to having a separate small master or is it sufficient to use one of the nodes as master+data and the other node as only data?

This is mostly a write heavy application with periodic queries and aggregations.

Upvotes: 4

Views: 3323

Answers (1)

Andrei Stefan
Andrei Stefan

Reputation: 52368

The general rule is: if anything you do on that cluster is so heavy that, because of the indexing/querying operations, it can bring down one node and that node is master, then yes I would recommend a master node.

For larger clusters (maybe more than 10 nodes) this is a must. But for smaller, you can go without a dedicated master. If the administrative operations a master is in charge with are messed up by the heavy data related operations, put a dedicated master.

The master node is responsible for coordinating any cluster-wide changes, such as as the addition or removal of a node, creation, deletion or change of state (open/close) of an index, and the allocation of shards to nodes. When any of these changes occur, the "cluster state" is updated by the master and published to all other nodes in the cluster. It is the only node that may publish a new cluster state.

A node is allowed to become a master if it is marked as "master eligible" (which all nodes are by default). If the current master goes down, a new master will be elected by the cluster.

Upvotes: 9

Related Questions