Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it necessary to use a load balancer for an Elasticsearch cluster running on Amazon EC2?

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?

Thanks! :)

like image 730
dan martin Avatar asked Nov 04 '16 18:11

dan martin


People also ask

Do we need load balancer for Elasticsearch?

Depending on your preferences, you might see a single connection to a single node as a point of cluster failure. A load balancer can prove effective to manage a pool of connections. However, Elasticsearch is designed to work without a load balancer.

Do you need a load balancer for EC2?

If your application is built within the Amazon Elastic Compute Cloud (Amazon EC2) Classic network, you should use Classic Load Balancer. If you need to deploy and run third-party virtual appliances, you can use Gateway Load Balancer.

What is the purpose of the AWS Elastic load balancer?

Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones (AZs).

What is a benefit of using an elastic load balancer ELB with applications running in the AWS cloud?

High availability An Elastic Load Balancer is highly available. You can distribute incoming traffic across your Amazon EC2 instances in a single Availability Zone or multiple Availability Zones. An Elastic Load Balancer automatically scales its request handling capacity in response to incoming application traffic.


1 Answers

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.

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

like image 84
Andreyy Avatar answered Nov 09 '22 15:11

Andreyy