In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the tuning method of ElasticSearch cluster". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the tuning method of ElasticSearch cluster".
Delegate power to things that others can do, and focus your free time on lucrative activities. Let go of other useless things and use your time to position yourself.
ElasticSearch cluster tuning
1. Node discovery
Unicast: you can specify the address of the connected host, which is generally set to the address of the master node. If there are multiple es clusters in the cluster environment, this method is generally used for security.
Add the following configuration to elasticSearch.yml
Discovery.zen.ping.unicast.hosts: ["* .61 9301", "* .62: 9301", "10.162.24.63 9301"]
Multicast: the default mode is relatively simple. If there are hosts in the cluster that can receive and respond, you can join the cluster.
Determine whether the host supports multicast:
Use the ifconfig command to query whether the response command contains the MULTICAST attribute.
2. Selection and configuration of nodes
Add the following configuration to elasticSearch.yml
Master node configuration
Node.master: true
Node.data: false
Data node configuration
Node.master: false
Node.data: true
Brain fissure prevention configuration:
Discovery.zen.minimum_master_nodes: n (n: the minimum number of primary nodes qualified and connected to each other, usually 50% of the number of all clusters + 1)
3. Gate of time
Configure safe havens for cluster data and metadata:
Add the following configuration to elasticSearch.yml
Gateway.type=local
4. Configure high query and high throughput
Filter cach
Indices.cache.filter.size= specific memory size or percentage of total memory
Field data cache and circuit breaker
Indices.fielddata.cache.size: 20% (you can set a specific value of 2G, or 20% of total memory) Note: the size of the field data cache is unlimited, so carelessness can cause the cluster memory to explode.
Indices.fielddata.breaker.limit:80% (default is 80%) can also be implemented through a field circuit breaker, setting the memory needed to limit the field cache, and throwing an exception beyond the set value
5. Index buffering and refresh rate
Indices.memory.index_buffer_size: 30% allows you to set the maximum amount of memory for the index, and set 30% of the maximum memory provided for buffering the index. You can also use the indices.memory.min_shard_index_buffer_size property, the default 4mb, to allow a minimum index buffer designed for each shard. The more memory available for the index buffer, the more documents are saved in memory.
Index.refresh_interval attribute. The default refresh rate is 1s (1 second). The refresh rate specifies how fast the document can be visible to the search operation. The equation is very simple: the faster the refresh rate, the slower the query, and the lower the index throughput. If we allow a slower refresh rate, such as 10s or 30s, it is good to set it, which makes ElasticSearch under pressure to update, you can use more resources for indexing and query.
6. Thread pool configuration
Thread_pool.write.queue_size: 2000, configuration write request queue is listed as 2000
It is strongly recommended to adjust the default thread pool and support index queues, write queues, read queues, etc.
7. Template
You can set the common properties of multiple indexes, and the template can be overwritten in layers before, and overwritten sequentially according to the order attribute.
Thank you for your reading. the above is the content of "tuning method of ElasticSearch Cluster". After the study of this article, I believe you have a deeper understanding of the tuning method of ElasticSearch cluster, and the specific use needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.