如何设置ES集群? [英] How to set up ES cluster?

查看:108
本文介绍了如何设置ES集群?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有5台机器,我想要运行一个弹性搜索集群,它们都连接到共享驱动器。我把弹性搜索的一个副本放在共享驱动器上,所以三个人都可以看到它。我只是在我的机器上的共享驱动器上启动弹性搜索,并且群集会自动运行它的魔法?或者我必须配置特定的设置以使弹性搜索实现它在5台机器上运行?如果是,相关设置是什么?我应该担心配置副本还是自动处理?

解决方案

它的超级简单。



您需要每台机器拥有自己的ElasticSearch副本(只需复制一个您现在所在的机器) - 原因是每个机器/节点将保留自己的文件被分片



您唯一需要做的是编辑配置文件以包含集群的名称。



如果所有机器具有相同的集群名称,弹性搜索将自动执行其余的操作(只要机器都在同一网络上)



让您开始:
https://www.elastic.co/guide/ en / elasticsearch / guide / current / deploy.html



当您创建索引(数据所在的位置)时,您需要定义多少个副本(they'l l分布在群集周围)


Assuming I have 5 machines I want to run an elasticsearch cluster on, and they are all connected to a shared drive. I put a single copy of elasticsearch onto that shared drive so all three can see it. Do I just start the elasticsearch on that shared drive on eall of my machines and the clustering would automatically work its magic? Or would I have to configure specific settings to get the elasticsearch to realize that its running on 5 machines? If so, what are the relevant settings? Should I worry about configuring for replicas or is it handled automatically?

解决方案

its super easy.

You'll need each machine to have it's own copy of ElasticSearch (simply copy the one you have now) -- the reason is that each machine / node whatever is going to keep it's own files that are sharded accross the cluster.

The only thing you really need to do is edit the config file to include the name of the cluster.

If all machines have the same cluster name elasticsearch will do the rest automatically (as long as the machines are all on the same network)

Read here to get you started: https://www.elastic.co/guide/en/elasticsearch/guide/current/deploy.html

When you create indexes (where the data goes) you define at that time how many replicas you want (they'll be distributed around the cluster)

这篇关于如何设置ES集群?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆