Mastering Elasticsearch Nodes: Types, Roles, and Scaling Strategies
This guide explains the different Elasticsearch node types, their default roles, how to configure master‑eligible, data, ingest, and coordinating‑only nodes, and provides best‑practice recommendations for planning and scaling large clusters to ensure stability and performance.
1. Node Types
When an Elasticsearch instance starts, it creates an ES node; multiple nodes form a cluster. Even a single node constitutes a cluster of size one. Each node handles HTTP and transport requests, with transport for inter‑node communication and HTTP for external REST clients. All nodes know about each other and can forward client requests to appropriate nodes.
Node roles include:
master‑eligible node : candidate for master election (node.master=true by default) and controls the cluster.
data node : stores data and handles CRUD, search, and aggregation operations (node.data=true by default).
ingest node : preprocesses documents before indexing via ingest pipelines (node.ingest=true by default). Heavy ingest workloads may warrant dedicated ingest nodes with node.master and node.data set to false.
tribe node : a special coordinating node that can connect to multiple clusters.
coordinate node : receives client requests, forwards them to data nodes, and merges results. Every node can act as a coordinating node unless all three role flags are false, in which case it becomes a pure coordinating node.
For clusters larger than 20 nodes, it is advisable to separate master, data, ingest, and coordinating nodes.
2. Master‑eligible Node
Master nodes perform lightweight cluster management tasks such as creating/deleting indices, tracking nodes, and allocating shards. They must have access to the data directory (path.data) to store the cluster state. To dedicate a node as master‑eligible only, set:
node.master: true
node.data: false
node.ingest: falseTo avoid split‑brain scenarios, configure discovery.zen.minimum_master_nodes to a quorum of master‑eligible nodes, calculated as (master_eligible_nodes / 2) + 1. For example, with three master‑eligible nodes: discovery.zen.minimum_master_nodes: 2 This setting must be updated as nodes join or leave the cluster, typically via the cluster settings API.
3. Data Node
Data nodes store shard data and handle resource‑intensive operations like CRUD, search, and aggregations. To configure a dedicated data node:
node.master: false
node.data: true
node.ingest: false4. Ingest Node
Ingest nodes run preprocessing pipelines composed of various ingest processors. For a dedicated ingest node, use:
node.master: false
node.data: false
node.ingest: true
search.remote.connect: false5. Coordinating‑only Node
Coordinating‑only nodes handle client request routing and result merging without storing data or participating in master elections. Configure them as:
node.master: false
node.data: false
node.ingest: false
search.remote.connect: falseWhile useful for large clusters, excessive coordinating nodes can increase the load on master nodes because they must acknowledge cluster‑state updates from all nodes.
6. Node Data Path Settings
Both data and master‑eligible nodes need access to path.data, where shard data and the cluster state are stored. In production, set an explicit directory in elasticsearch.yml: path.data: /var/elasticsearch/data The node.max_local_storage_nodes setting controls whether multiple nodes can share the same data directory. For production, keep this value at 1 to prevent data corruption.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
