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! :)
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.
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.
Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones (AZs).
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With