简体   繁体   English

ElasticSearch复制

[英]ElasticSearch replication

Can somebody provide some instructions on how to configure ElasticSearch for replication. 有人可以提供一些有关如何配置ElasticSearch进行复制的说明。 I am running ES in windows and understand that if I run the bat files multiple times on the same server, a separate instance of ES is started and they all connect to each other. 我在Windows中运行ES,并且了解到,如果我在同一台服务器上多次运行bat文件,则会启动ES的单独实例,并且它们彼此连接。

I will be moving to a production environment soon and will have a three node set up, each node being on a different server. 我将很快移至生产环境,并将设置三个节点,每个节点位于不同的服务器上。 Can someone point me at some documentation which gives me a bit more control of the replication set up. 有人可以向我指出一些文档,这些文档使我对复制设置有更多的控制权。

Have a look at the discovery documentation . 看一下发现文档 It works out-of-the-box with multicast discovery, even though you could have problems with firewalls etc., but I would recommend against it in production. 即使您可能遇到防火墙等问题,它也可以与多播发现配合使用,但我建议在生产中不要使用它。 I would rather use unicast and configure the host names of the nodes belonging to the cluster in the elasticsearch.yml . 我宁愿使用单播和配置属于在集群节点的主机名elasticsearch.yml That way you make sure nobody is going to join the production cluster from his own machine. 这样,您可以确保没有人会从他自己的计算机加入生产集群。

One other thing I would do is configure a proper cluster name specific for every environment. 我要做的另一件事是为每个环境配置适当的群集名称。

Replication is set to each index in Elasticsearch, not set to the server or node. 复制设置为Elasticsearch中的每个索引,而不设置为服务器或节点。 That is, each index can have different number of replication setting. 即,每个索引可以具有不同数量的复制设置。 The number of replica setting is 1 by default. 副本设置的数量默认为1。

The number of replication is not related or restricted to number of node set up. 复制的数量与节点设置的数量无关或不受其限制。 If the number of replication is greater than the number of data nodes, only the index health becomes yellow since some replications are not allocated, anything still works fine. 如果复制的数量大于数据节点的数量,则由于未分配某些复制,只有索引运行状况会变为黄色,因此一切正常。

You can reference to the document for further information: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html 您可以参考该文档以获取更多信息: https : //www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html

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

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