ElasticSearch configuration instructions

1.config/elasticsearch.yml configuration description
cluster.name : elasticsearch
configures the cluster name of es, the default is elasticsearch, es will automatically discover es under the same network segment, if there are multiple clusters under the same network segment, you can use This property is used to distinguish different clusters.

node.name: "node-1"
node name. By default, a name in the name list is randomly assigned. The list is in the name.txt file in the config folder of the es jar package. There are many interesting names added by the author.

node.master: true
specifies whether the node is eligible to be elected as a node, the default is true, es is the first machine in the default cluster as the master, if the machine hangs up, the master will be re-elected.

node.data:true
specifies whether the node stores index data, the default is true.

node.rack:r-1 #The rack to which the node belongs

index.number_of_shards:5
Set the default number of index shards, which is 5 by default.

index.number_of_replicas: 1
sets the default number of index replicas, the default is 1 replica.

path.conf:/path/to/conf
sets the storage path of the configuration file. The default is the config folder in the es root directory.

path.data:/path/to/data
Set the storage path of the index data. The default is the data folder in the es root directory. Multiple storage paths can be set, separated by commas, for example:
path.data:/path/to/data1,/path/to/data2

path.work:/path/to/work
Set the storage path of temporary files, the default is the work folder under the es root directory.

path.logs:/path/to/logs
sets the storage path of log files, the default is the logs folder in the es root directory

path.plugins:/path/to/plugins
sets the storage path of the plug-ins, the default is in the es root directory The plugins folder

bootstrap.mlockall:true
is set to true to lock the memory. Because the efficiency of es will be reduced when the jvm starts swapping, to ensure that it does not swap, you can set the two environment variables ES_MIN_MEM and ES_MAX_MEM to the same value, and ensure that the machine has enough memory allocated to es. At the same time, it is necessary to allow the elasticsearch process to lock the memory. Under Linux, you can use the `ulimit-l unlimited` command.

network.bind_host: 192.168.0.1
sets the bound IP address, which can be ipv4 or ipv6, and the default is 0.0.0.0.


network.publish_host:192.168.0.1
Set the ip address of other nodes interacting with this node. If it is not set, it will be automatically judged, and the value must be a real ip address.

The parameter network.host:192.168.0.1
is used to set the above two parameters of bind_host and publish_host at the same time.

transport.tcp.port: 9300
Sets the tcp port for interaction between nodes, the default is 9300.

transport.tcp.compress:true
Set whether to compress the data during tcp transmission, the default is false, no compression.

http.port:9200
Sets the http port for external services, the default is 9200.

http.max_content_length: 100mb
sets the maximum capacity of the content, the default is 100mb

http.enabled: false
whether to use the http protocol to provide services to the outside world, the default is true, enabled.

gateway.type:
The type of local gateway, the default is local, which is the local file system. It can be set to the local file system, distributed file system, HDFS of hadoop, and s3 server of amazon. The setting method of other file systems will be detailed next time. Say.

gateway.recover_after_nodes: 1
Sets data recovery when N nodes in the cluster are started, the default is 1.

gateway.recover_after_time: 5m
Sets the timeout time for initializing the data recovery process. The default is 5 minutes.

gateway.expected_nodes: 2
sets the number of nodes in this cluster, the default is 2, once the N nodes are started, data recovery will be performed immediately.

cluster.routing.allocation.node_initial_primaries_recoveries:4
When initializing data recovery, the number of concurrent recovery threads is 4 by default.

cluster.routing.allocation.node_concurrent_recoveries: 2
The number of concurrent recovery threads when adding and deleting nodes or load balancing, the default is 4.

indices.recovery.max_size_per_sec:0
sets the limited bandwidth during data recovery, such as 100mb, the default is 0, that is, unlimited.

indices.recovery.concurrent_streams:5
Set this parameter to limit the maximum number of concurrent streams opened at the same time when recovering data from other shards. The default is 5.

discovery.zen.minimum_master_nodes:1
Set this parameter to ensure that nodes in the cluster can know about other N master-qualified nodes. The default is 1. For large clusters , a larger value (2-4) can be

set
Poor network environments can use higher values ​​to prevent errors during automatic discovery.

discovery.zen.ping.multicast.enabled:false
Sets whether to enable multicast discovery nodes, the default is true.

discovery.zen.ping.unicast.hosts:["host1", "host2:port","host3[portX-portY]"]
Sets the initial list of master nodes in the cluster, which can be used to automatically discover newly joined clusters. node

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326803262&siteId=291194637