Elasticsearch配置项

官方文档

Elasticsearch的配置主要分两种

  • 静态配置:主要配置每一个节点的config/elasticsearch.yml、启动时命令行传参数,需要每一个节点都要做配置,更改不容易
  • 动态配置:可以通过api动态更新集群中的配置

 

分模块的配置

 ---------------------------------- Cluster -----------------------------------

Cluster routing and shard allocation:集群中的路由和分片配置-分片在节点上的分配

cluster.name: my-application #集群名称

cluster.routing.allocation.enable:all|primaries|new_primaries|none #分片分配方式(default:all)

cluster.routing.allocation.node_concurrent_recoveries:2 #在一个节点上允许多少分片数据重新分布(default:2)

cluster.routing.allocation.node_initial_primaries_recoveries:4 #

 ---------------------------------- Discovery-----------------------------------

Discovery:集群中发现其他节点机制配置

 ---------------------------------- Gateway-----------------------------------

Gateway:集群中配置多少节点启动了或启动多长时间后可以数据恢复和负载均衡

数据恢复或叫数据重新分布,es在有节点加入或退出时会根据机器的负载对索引分片进行重新分配,挂掉的节点重新启动时也会进行数据恢复。

 ---------------------------------- Network-----------------------------------

Network:es的网络配置

 ---------------------------------- HTTP-----------------------------------

HTTP:es提供http REST interface 配置

 ---------------------------------- Indices-----------------------------------

Indices:全局索引的默认配置

 ---------------------------------- Node client-----------------------------------

 

 ---------------------------------- Plugins-----------------------------------

---------------------------------- Scripting-----------------------------------

---------------------------------- Snapshot/Restore-----------------------------------

---------------------------------- Thread pools-----------------------------------

---------------------------------- Transport-----------------------------------

---------------------------------- Tribe nodes-----------------------------------

 

 

 

 

转载于:https://my.oschina.net/emisky/blog/681424