2 Settings -- 3 Important Configurations

Set the data and log storage path
path:
  logs: /var/log/elasticsearch
  data: /var/data/

elasticsearch path.data can also be set in different paths
path:
  data:
    - /mnt/elasticsearch_1
    - /mnt/elasticsearch_2
    - /mnt/elasticsearch_3

cluster.name represents the name of the cluster you want to join (default is elasticsearch). Here we must pay attention to the different cluster names in different environments, otherwise the data will be cluttered. (es are added to the cluster according to the cluster name. If the cluster names are the same, a large cluster will be formed. The data will also be shared accordingly)

node.name: node name. es will use the first seven characters of uuid as the name by default. If you want the name to be the same every time you restart, it's best to set it.


bootstrap.memory_lock: best set to true (he is important for the health of the es node). Set whether to hold memory, if true, no swap memory is performed.

network.host: The default es binding needs to change the address. In order to facilitate the communication of es, it is best to set it as a non-loopback address.

discovery.zen.ping.unicast.hosts: By default, es will scan ports 9300 to 9305 of the loopback address (my understanding is this machine) and try to connect to other es. If you want to form a cluster with es on other machines, you need to set the scanned ip
such as:
discovery.zen.ping.unicast.hosts:
   - 192.168.1.10:9300
   - 192.168.1.11
   - seeds.mydomain.com

discovery.zen.minimum_master_nodes: Minimum number of nodes in the cluster (recommended (master/2) + 1)




Guess you like

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