Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
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.

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.

The shortcut

For any node, ask "does it decide, hold, or hand off?" Decides cluster-wide changes → master. Holds data → data. Only hands requests out and merges results → coordinating-only.

One search across a three-data-node clusterStep 1 of 4
  1. Hand off

    The client's GET /books/_search lands on a coordinating-only node, which asks the cluster state where the books data lives.

Drills

Answer fast — trust the rule.

quick drill

Which node keeps track of which indices exist and where their data lives?

quick drill

How do you configure a coordinating-only node?

quick drill

Which role needs the most disk space?

quick drill

Why do large clusters often use dedicated master nodes?

Remember

  • Master nodes manage, data nodes store and search, coordinating nodes route and gather.
  • Every node coordinates; node.roles: [ ] makes a coordinating-only node.
  • Decide → master, hold → data, hand off → coordinating.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainFollow a search through the cluster

A cluster has three dedicated master nodes, four data nodes and two coordinating-only nodes. Explain what each kind of node does while a single search on the books index runs, and why the masters are kept separate.