Elasticsearch集群中indices.*类配置需部署在哪些节点?
Hey there! Since you're new to managing Elasticsearch clusters, let's break this down clearly so you know exactly where to set indices.memory.index_buffer_size (and similar index-related configs).
First, a quick recap: This setting controls the heap memory allocated to the indexing buffer—the in-memory space where Elasticsearch holds documents temporarily before flushing them to disk. This buffer only matters for nodes that handle data storage or indexing tasks.
Now, here's the breakdown per node type:
- Data nodes: Definitely apply this setting here. Data nodes store your cluster's data, process indexing requests, and serve search queries—they're the primary consumers of the indexing buffer.
- Master-data combined nodes: Yes, set this here too. These nodes act as both master (cluster management) and data nodes, so they still handle data storage and indexing work, making the index buffer configuration necessary.
- Dedicated master nodes: Don't bother setting this here. Pure master nodes only handle cluster-level tasks like shard allocation and cluster state updates—they don't store data or process indexing requests. The indexing buffer has no use on these nodes, so configuring it here is unnecessary and won't have any effect.
A quick best practice: If your cluster has mixed node types, use node-specific configurations (like targeting roles in elasticsearch.yml) to apply this setting only to relevant nodes, instead of setting it globally across all nodes. This keeps your config clean and avoids applying unused settings where they don't belong.
内容的提问来源于stack exchange,提问作者gaurav9620

