简体   繁体   English

什么时候应该转移到多节点Elasticsearch集群?

[英]When should I move to multinode elasticsearch cluster?

I have a node with 32GB Memory and Quad Core 3.2GZ CPU. 我有一个具有32GB内存和Quad Core 3.2GZ CPU的节点。 I am using single node ElasticSearch6.2.1 (ES) cluster and assinged 16GB Memory to ES. 我正在使用单节点ElasticSearch6.2.1(ES)集群,并将16GB内存分配给ES。 I am using ES for my catalog search. 我正在使用ES进行目录搜索。 It's working fine but sometimes (2-3 times a month) ES is getting overwhelmed a too slow to respond and CPU utilization is becoming 100% (ES using the major part) at that time and until I restart ElasticSearch it does not respond. 它工作正常,但有时(每月2-3次)ES变得不堪一击,响应速度太慢,并且当时CPU利用率已达到100%(ES使用主要部分),直到我重新启动ElasticSearch为止它都没有响应。

I have checked all my queries and they are okay. 我已经检查了所有查询,而且还可以。 In my single node cluster there are 14 indices with an average 50,000 document. 在我的单节点群集中,有14个索引,平均50,000个文档。

I need to know should I add an extra node in my cluster? 我需要知道是否应该在集群中添加一个额外的节点吗?

Also my curiosity is:- Is there any parameter like index size, traffic to ES etc. by observing which I should decide on adding a new node? 我的好奇心还包括:-是否有观察到我应该决定添加新节点的参数,例如索引大小,到ES的流量等?

My generalized question is :- When Should I move to multi-node Elasticsearch cluster? 我的普遍性问题是:-什么时候应该移至多节点Elasticsearch集群?

If you have a single node it's not really a cluster it's just a single node. 如果您只有一个节点,那么它实际上不是集群,而仅仅是一个节点。

  • First your performances issues could be generated because of many problems : high memory, too many requests ... I would advise you to try to evaluate first the number of requests that you have when there is a high load (netstat on the machine) and to check whether the allocated memory is consumed in the JVM or not (use jconsole or watch at logs). 首先,可能由于许多问题而导致性能问题:高内存,太多请求……我建议您首先评估一下在高负载(计算机上的netstat)下您拥有的请求数量,以及检查分配的内存是否已在JVM中消耗(使用jconsole或查看日志)。 Watch also your mappings for full text search (text fields on suggest), this could use a big amount of memory. 还要注意您的映射以进行全文本搜索(建议中的文本字段),这可能会占用大量内存。 If you think that the issue is related to the number of connections you should definitely have a multi node cluster configuration. 如果您认为问题与连接数有关,那么您绝对应该具有多节点群集配置。 If the issue is related to memory either you'll have to tune your mappings or increase the memory allocated rather than just adding nodes. 如果问题与内存有关,则您必须调整映射或增加分配的内存,而不仅仅是添加节点。
  • Second concerning your cluster, to my mind you should at least have 2 servers. 第二点关于您的集群,在我看来,您至少应拥有2台服务器。 This is for redundancy. 这是为了冗余。 This will prevent most of your loss of service issues if one server doesn't answer anymore. 如果一台服务器不再响应,这将避免大多数服务丢失问题。 You should not wait to scale your cluster. 您不应该等待扩展集群。 Put also a regular check to see if the service is still up on one machine and if not either restart automatically your service or send one emails so that you'll be able to restart manually. 还要进行定期检查,以查看该服务是否仍在一台计算机上,如果没有,则该服务会自动重新启动服务或发送一封电子邮件,以便您可以手动重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM