Skip to the workspace
Pebellslearn by building
Cluster Anatomy and Mappings  ›  Lesson

Node Roles: Master, Data and Coordinating

Master-Elegible Nodes 12 minMaster-eligible nodes manage cluster state, data nodes store and search documents, and coordinating nodes route requests and merge the answers.

elasticsearch / Node Roles: Master, Data and Coordinating

Explore each scene at your own pace.

01 · The rule

The rule

Node Roles: Master, Data and Coordinating

The bookshop grows and one node is no longer enough. You add machines — but not every node has to do every job. Elasticsearch lets you give each node roles, and knowing the three main ones explains most cluster designs you will ever see.

The rule

Master nodes manage, data nodes store and search, coordinating nodes route and gather.

  • Master-eligible node (master role) — can be elected the master. The elected master keeps the cluster state: which indices exist, their mappings, which node holds which piece of data, which nodes have joined or left. It does bookkeeping, not heavy searching.
  • Data node (data role, or tiered versions like data_hot and data_warm) — holds the actual documents and does the work on them: indexing, searching, aggregating. Data nodes need disk, memory and CPU.
  • Coordinating node — receives a client's request, forwards pieces of it to the data nodes that hold the relevant data, then merges their partial answers into one reply. Every node coordinates the requests it receives; a coordinating-only node is one with no other roles.

Roles are set in elasticsearch.yml:

# a dedicated master-eligible node
node.roles: [ master ]

# a data node
node.roles: [ data ]

# a coordinating-only node: an empty list
node.roles: [ ]

If you set nothing, a node takes almost every role — perfect for a laptop, risky for a big cluster, where a master busy with heavy searches can become slow to manage the cluster.

Other roles exist (ingest for pre-processing documents, ml for machine learning, transform), but these three are the skeleton.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.