ES configuration file Reference and parameters detailed

Source: Internet
Author: User

Cluster.name:data-cluster node.name: "data-es-05" #node. Data:false # indexing & Cache config index.number_of_ Shards:5 index.number_of_replicas:1 Index.cache.field.type:soft index.cache.field.expire:10m Index.cache.query.ena Ble:true indices.cache.query.size:2% indices.fielddata.cache.size:35% indices.fielddata.cache.expire:10m Index.sea Rch.slowlog.level:INFO #indices. RECOVERY.MAX_SIZE_PER_SEC:1GB Index.merge.scheduler.max_thread_count:2 # only for      Spinning media. # Refresh config index.refresh_interval:300s # Translog config index.translog.flush_threshold_ops:100000 # Pa ths config path.data:/data/esdata path.plugins:/usr/share/elasticsearch/plugins # Network and HTTP Network.bind_h ost:10.0.126.203 network.publish_host:10.0.126.203 transport.tcp.port:9300 transport.tcp.compress:true http.port: 9200 # Discovery Discovery.zen.minimum_master_nodes:1 discovery.zen.ping.timeout:10s discovery.zen.ping.multicast EAbled:false discovery.zen.ping.unicast.hosts: ["10.0.32.3:9300", "10.0.4.37:9300", "10.0.40.159:9300", "  10.0.107.116:9300 "," 10.0.126.203:9300 "]

The configuration file is located in the%es_home%/config/elasticsearch.yml file, and you can configure it by opening it with EditPlus.
All configurations can use environment variables, for example:
Node.rack: ${rack_env_var} Indicates that there is a Rack_env_var variable in the environment variable.
The following is a list of Elasticsearch configurable items:
1. Cluster name, default is Elasticsearch:
Cluster.name:elasticsearch
2. Node name, the node name is created automatically when ES starts, but you can also configure:
Node.name: "Franz Kafka"
3. Whether as the primary node, each node can be configured as the primary node, and the default value is true:
Node.master:true
4. Whether the data is stored, that is, the index fragment is stored, the default value is true:
Node.data:true
The simultaneous configuration of master and data produces some bizarre effects:
1) When Master is false and data is true, the node is severely overloaded;
2) When Master is true and data is false, the node acts as a coordinator;
3) When Master is False,data also false, the node becomes a load balancer.
You can connect http://localhost:9200/_cluster/health or http://localhost:9200/_cluster/nodes, or use plugins http://github.com/ Lukas-vlcek/bigdesk or Http://mobz.github.com/elasticsearch-head to view the cluster status.
5. Each node can define some common properties associated with it for filtering when a post-cluster is fragmented:
node.rack:rack314
6. By default, multiple nodes can be started on the same installation path, if you want your ES to start only one node, you can set the following:
Node.max_local_storage_nodes:1
7. Set the number of fragments for an index, the default value is 5:
Index.number_of_shards:5
8. Set the number of copies that an index can be copied, and the default value is 1:
Index.number_of_replicas:1
When you want to disable an advertisement, you can set the following:
Index.number_of_shards:1
index.number_of_replicas:0
The settings of these two properties directly affect the execution of indexes and search operations in the cluster. Assuming you have enough machines to hold fragments and replicas, you can set these two values as follows:
1) Having more fragments can improve the index execution capability and allow a large index to be distributed through the machine;
2) Having more replicators can improve the ability of search execution and clustering.
For an index, number_of_shards can only be set once, and Number_of_replicas may be incremented or reduced at any time using the index Update Settings API.
Elasticsearch focuses on load balancing, migration, clustering results from nodes, and more. You can try a variety of designs to accomplish these functions.
You can connect Http://localhost:9200/A/_status to detect the status of an index.
9. Where the configuration files are located, i.e. where Elasticsearch.yml and Logging.yml are located:
Path.conf:/path/to/conf
10. Where the index data is assigned to the current node:
Path.data:/path/to/data
You can optionally include more than one location so that the data spans the file level so that there are more free paths at the time of creation, such as:
Path.data:/path/to/data1,/path/to/data2
11. Temporary File Location:
Path.work:/path/to/work
12. log file Location:
Path.logs:/path/to/logs
13. Plug-in installation location:
Path.plugins:/path/to/plugins
14. Plugin hosting location, if one of the plugins in the list is not installed, the node will not start:
Plugin.mandatory:mapper-attachments,lang-groovy
When the JVM starts swapping, Elasticsearch does not perform well: you need to protect the JVM from swapping, and you can set Bootstrap.mlockall to true to disallow swapping:
Bootstrap.mlockall:true
Make sure that the values for the Es_min_mem and Es_max_mem are the same, and that you can allocate enough intrinsic to the elasticsearch and leave enough memory for the system operation.
16. By default, Elasticsearch uses an 0.0.0.0 address and opens port 9200-9300 for HTTP transmission, 9300-9400 ports for node-to-node communication, and an IP address for self-provisioning:
network.bind_host:192.168.0.1
Publish_host set the address of the other node to connect to this node, and if not set, the Publish_host address must be the real address:
network.publish_host:192.168.0.1
Bind_host and Publish_host can be set together:
network.host:192.168.0.1
19. You can customize the port on which the node interacts with other nodes:
transport.tcp.port:9300
20. When interacting between nodes, you can set whether or not to compress and convert to No compression:
Transport.tcp.compress:true
21. Custom ports can be monitored for HTTP transport:
http.port:9200
22. Set the maximum length of the content:
http.max_content_length:100mb
23. Disable HTTP
Http.enabled:false
24. The gateway allows the cluster state to be held after all cluster restarts, changes to the cluster state are preserved, and when the cluster is first enabled, it can be read from the gateway to the State, and the default gateway type (also recommended) is Local:
Gateway.type:local
25. Allow the recovery process after N nodes are started:
Gateway.recover_after_nodes:1
26. Set the time-out period for initializing the recovery process:
Gateway.recover_after_time:5m
27. Set the maximum nodes that can exist in the cluster:
Gateway.expected_nodes:2
28. Set the concurrent number of a node in two cases, one in the initial recovery process:
Cluster.routing.allocation.node_initial_primaries_recoveries:4
The other is when you add, remove nodes, and adjust:
Cluster.routing.allocation.node_concurrent_recoveries:2
29. Set the throughput at recovery, which is unlimited by default:
indices.recovery.max_size_per_sec:0
30. Set the maximum number of streams opened when recovering fragments from a peer node:
Indices.recovery.concurrent_streams:5
31. Set the number of primary nodes in a cluster, which can be between 2-4 when there are more than three nodes:
Discovery.zen.minimum_master_nodes:1
32. Set the time-out when pinging other nodes, which can be larger when the network is slow:
Discovery.zen.ping.timeout:3s
There are more settings on http://elasticsearch.org/guide/reference/modules/discovery/zen.html on the discovery.
33. Prohibit the current node from discovering multiple cluster nodes, the default value is true:
Discovery.zen.ping.multicast.enabled:false
34. Set up a list of master nodes that can be discovered when a new node is started (mainly for different network segment machine connections):

Discovery.zen.ping.unicast.hosts: ["host1", "Host2:port", "Host3[portx-porty]"]

35. Set whether the index can be deleted or closed via regular or _all

Action.destructive_requires_name default false allows setting true to not allow

ES configuration file Reference and parameters detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.