Switching between the Nodes in ElasticSearch using JEST client


(kamdar.mufaddal) #1

I have 3 Nodes in my ElasticSearch Cluster. eg. 10.10.0.1, 10.10.0.2, 10.10.0.3

Now i am trying to connect to the Cluster using Jest Client API and giving the IP(10.10.0.1) of one of the above nodes. Now if the Node(10.10.0.1) is down, so does that mean that i would not able to acess the custer ?

How to handle this kind of problem where we have multiple nodes and we try to connect to the culster from the code using one IP address ?

Or

Should I go and create other Connection giving the other IP address ? which I feel is very Cude way of doing it because, what if we have 100 node, In that case we would end up trying to connect to 100 nodes one after other.

Need urgent assistance.

Thanks in advance, MIK


(system) #2