在Amazon EC2上运行的Elasticsearch集群是否需要使用负载均衡器? [英] is it necessary to use a load balancer for an Elasticsearch cluster running on Amazon EC2?

查看:83
本文介绍了在Amazon EC2上运行的Elasticsearch集群是否需要使用负载均衡器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对我的Elasticsearch集群如何处理流量感到有些困惑。我在集群中连接了多个EC2实例。现在,在我的应用程序中,我将其设置为通过实例之一的ip连接到集群。我知道此节点随后可以与集群中的所有其他节点连接并进行适当的转发,但是由于所有流量最初都定向到该节点时,该特定实例是否不会过载?我是否必须使用负载平衡器,然后将应用程序指向该负载平衡器,或者我是否对此理解不正确?

I'm slightly confused about how my elasticsearch cluster will handle traffic. I have several EC2 instances connected in a cluster. Now, in my application I've set it to connect to the cluster via the ip of one of the instances. I know this node can then connect with all the others in the cluster and forward appropriately, but will that particular instance not become overburdened as all of the traffic is being directed initially at that one node? Do I have to use a load balancer and then point the application to that, or am I not understanding this properly?

谢谢! :)

推荐答案

我认为您的问题和想法是合法的。但是根据我的经验,客户端应该知道多个实例,并且无需负载平衡器即可分配负载。

I think your question and thinking is legit. In my experience however clients should be aware of multiple instances and distribute the load without the need for a load balancer.

请参见此客户端配置示例以获取ruby:多个节点并重试失败

See this client config example for ruby: Multiple nodes and retry on falure

这篇关于在Amazon EC2上运行的Elasticsearch集群是否需要使用负载均衡器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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