Es Cluster configuration in detail

elasticsearch.yml service profile

parameter:

Cluster


cluster.name:elasticsearch

Es cluster configuration name, the default is elasticsearch, es es automatically discovers in the same network segment, if there are multiple clusters in the same network segment, you can use this property to distinguish between different clusters.

index.number_of_shards:5

设置默认索引分片个数,默认为5片。Since elasticsearch 5.x index level settings can NOT be set on the nodes configuration like the elasticsearch.yaml, in system properties or command line arguments.In order to upgrade all indices the settings must be updated via the /${index}/_settings API. Unless all settings are dynamic all indices must be closed

in order to apply the upgradeIndices created in the future should use index templates

to set default values.

Please ensure all required values are updated on all indices by executing:

curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{

"index.number_of_replicas" : "1",

"index.number_of_shards" : "7"

}'

index.number_of_replicas:1

Set the default number of copies of the index, the default is one copy. 5.X or later can not be configured in the configuration file inside.

Node


node.name:"FranzKafka"

Node name, the default name randomly assigned to a list name, the list config file folder name.txt es in the jar package, which add a lot of interesting names.

node.master:true

Specifies whether the node is eligible to be elected as the node, the default is true, es is the default cluster first machine for the master, if this machine will be linked to the re-election of master.

node.data:true

Specify whether the node storing the index data, the default is trues

action.auto_create_index: false

Disable automatic index creation

action.destructive_requires_name: true

This setting is limited to only delete the data point to a specific name, but does not allow to delete the specified index database by specifying _all or wildcard.

Paths


path.conf:/path/to/conf

Storage path setting configuration file, the default is the config file in the root directory folder es.

path.data:/path/to/data

Set index data storage path, data file in the default root folder es may be provided a plurality of storage paths, separated by commas, for example:
path.data:/path/to/data1,/path/to/data2

path.work:/path/to/work

Set up a temporary file storage path, the default is the work files under the root directory folder es.

path.logs:/path/to/logs

Set the log file storage path, the default is the logs files in the root directory folder es

path.plugins:/path/to/plugins

Storage path settings widget default plugins files in the root directory folder es

Memory


bootstrap.mlockall:true

Set to true to lock the memory. Because when jvm starts swapping es efficiency will be reduced, so to ensure that it does not swap, and can ES_MIN_MEM two ES_MAX_MEM environment variable to the same value, and to ensure that the machine has enough memory allocated es. But also allows a process elasticsearch can lock memory, the Linux can ulimit-l unlimitedcommand.

Network


network.bind_host:192.168.0.1

Set the binding ip address, can be ipv4 or ipv6 default is 0.0.0.0.

network.publish_host:192.168.0.1

Node and the other nodes arranged to interact ip address, if it is not set automatically determined, the value must be a real ip address.

network.host:192.168.0.1

This parameter is used to set both bind_host and publish_host above two parameters.

transport.tcp.port:9300

Set the interaction between nodes tcp port, the default is 9300.

transport.tcp.compress:true

Set whether to compress data when tcp transmission, default is false, not compressed.

http.port:9200

Set external services http port, default 9200.

http.max_content_length:100mb

Set the contents of the maximum capacity of 100mb default

http.enabled:false

Whether to use the http protocol to provide services, the default is true, open.

Gateway


gateway.type:local

gateway type, the default is local is the local file system can be set to the local file system, distributed file system, Hadoop's HDFS, and the amazon s3 server, set up the next method other file system again in detail.

gateway.expected_nodes:2 10

Set the number of nodes in the cluster, the default is 2, N nodes once it started, the data will be immediately restored.

gateway.expected_master_nodes

Expected in the main cluster nodes. Once the desired main nodes join the cluster will begin to restore the local fragmentation. The default is 0

gateway.expected_data_nodes

Expected data in the cluster nodes. Once the expected number of nodes have joined the cluster, it will start to restore local fragmentation. The default is 0

gateway.recover_after_time:5m

If you do not achieve the desired number of nodes, the recovery process will configure the amount of time to wait, and then try to recover.
Set the timeout initialization data recovery process, the default is 5 minutes.

If recover_after_time timeout duration, provided that the following conditions are met, the recovery will begin:

gateway.recover_after_nodes:1

Set cluster nodes N data recovery startup, a default. It means that at least one node, the cluster is available.
As long as this many data or primary node has joined the cluster, can be restored.

gateway.recover_after_master_nodes

As long as so many primary node has joined the cluster, it can be restored.

gateway.recover_after_data_nodes

As long as so much data node has joined the cluster, it can be restored.


cluster.routing.allocation.node_initial_primaries_recoveries:4

Initialization data recovery, restore the number of concurrent threads, the default is 4.

cluster.routing.allocation.node_concurrent_recoveries:2

Add or delete nodes load concurrent restore equilibrium number of threads, the default is 4.

indices.recovery.max_size_per_sec:0

Limits when restoration bandwidth setting data, such as the 100MB, the default is 0, that is unlimited.

indices.recovery.concurrent_streams:5

This parameter is provided to limit the maximum number of concurrent streams simultaneously opened while the data from the other fragments, the default is 5.

Discovery


discovery.zen.minimum_master_nodes:1

Setting this parameter to ensure that the cluster nodes can know the other N nodes have master qualifications. Defaults to 1 for large clusters, it can be set a large value (2-4) point

discovery.zen.ping.timeout:3s

Auto Discovery Set cluster ping timeout when other nodes are connected, a default of 3 seconds, the value may be relatively poor for a network environment to prevent high Error automatic discovery.

discovery.zen.ping.multicast.enabled:false

Set whether to turn on multicast discovery node, the default is true.

discovery.zen.ping.unicast.hosts:["host1", "host2:port","host3[portX-portY]"]

Setting the initial list of nodes in the cluster master, it can automatically discover the new node through the nodes of the cluster

Guess you like

Origin blog.csdn.net/weixin_34380296/article/details/90948207