Point to any machine in the cluster?

I am sure this is a basic question but I just don't see it answered in any clear way.
We are running a Ruby on Rails 5 app using the elasticsearch-rails gem. We have a cluster of 3 machines for ElasticSearch.

Can we point the 'elasticsearch url' at any of these 3 machines? If I am reading things right there is no concept of master and slave, so, in theory we can use any of them.

Really this is part of a larger question of what is a cluster and what good is it! Our 2nd and 3rd machines in the cluster seem to have almost no CPU/IO activity while our 1st machine (the one pointed to) is getting hit quite hard. We were hoping to someone spread all the load.

Yes, that's correct.

Do you use Rest client ? You can point the 'elasticsearch url' at all of machines to spread load.

Thanks, that is what I ended up doing:

Elasticsearch::Model.client = Elasticsearch::Client.new hosts: [machine1_ip, machine2_ip],
                                                          transport_options: { request: { timeout: 5 } }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.