ES集群如何搭建? [英] How to set up ES cluster?

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

问题描述

假设我有 5 台机器,我想在其上运行一个 elasticsearch 集群,并且它们都连接到一个共享驱动器.我在那个共享驱动器上放了一个 elasticsearch 的副本,这样三个人都可以看到它.我是否只是在我所有机器上的共享驱动器上启动 elasticsearch 并且集群会自动发挥它的魔力?或者我是否必须配置特定设置才能让 elasticsearch 意识到它在 5 台机器上运行?如果是,相关设置是什么?我应该担心配置副本还是自动处理?

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?

推荐答案

超级简单.

您需要每台机器都有自己的 ElasticSearch 副本(只需复制您现在拥有的副本)——原因是每台机器/节点都会保留自己的文件,这些文件在集群中分片.

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.

如果所有机器的集群名称相同,elasticsearch 会自动完成剩下的工作(只要机器都在同一个网络上)

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)

阅读此处以帮助您入门:https://www.elastic.co/guide/en/elasticsearch/guide/current/部署.html

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天全站免登陆