0
0
Elasticsearchquery~5 mins

Node roles (master, data, ingest) in Elasticsearch

Choose your learning style9 modes available
Introduction

Node roles help organize how different servers in Elasticsearch work together. Each role has a special job to keep the system fast and reliable.

When setting up a new Elasticsearch cluster and deciding which servers do what job.
When you want to improve search speed by separating data storage and data processing.
When you need to make sure the cluster stays healthy by having dedicated nodes to manage the cluster.
When you want to handle incoming data efficiently by using special nodes for data intake.
When troubleshooting performance issues by understanding which node does which task.
Syntax
Elasticsearch
node.roles: ["master", "data", "ingest"]

This setting goes in the elasticsearch.yml file on each node.

You can assign one or more roles to a node by listing them in the array.

Examples
This node only manages the cluster and does not store data or process incoming data.
Elasticsearch
node.roles: ["master"]
This node stores and searches data but does not manage the cluster or process incoming data.
Elasticsearch
node.roles: ["data"]
This node processes incoming data pipelines but does not store data or manage the cluster.
Elasticsearch
node.roles: ["ingest"]
This node manages the cluster and stores data, but does not process incoming data pipelines.
Elasticsearch
node.roles: ["master", "data"]
Sample Program

This example shows how to assign roles to three different nodes in an Elasticsearch cluster. Each node has a clear job.

Elasticsearch
# Example elasticsearch.yml settings for three nodes

# Node 1: Master node
node.roles: ["master"]

# Node 2: Data node
node.roles: ["data"]

# Node 3: Ingest node
node.roles: ["ingest"]
OutputSuccess
Important Notes

Master nodes control the cluster state and coordinate changes.

Data nodes store the actual data and handle search requests.

Ingest nodes process data before it is indexed, like transforming or enriching data.

Summary

Node roles split tasks to keep Elasticsearch fast and stable.

Assign roles in elasticsearch.yml using the node.roles setting.

Common roles are master, data, and ingest, each with a clear job.