java - Switching between the nodes in ElasticSearch using JEST client -



java - Switching between the nodes in ElasticSearch using JEST client -

i have 3 nodes in elasticsearch cluster. eg. 10.10.0.1, 10.10.0.2, 10.10.0.3

now trying connect cluster using jest client api , giving ip (10.10.0.1) of 1 of above nodes. if node (10.10.0.1) down, mean not able access cluster?

how handle kind of problem have multiple nodes , seek connect cluster code using 1 ip address?

or

should go , create other connection giving other ip address? sense rough way of doing because, if have 100 node, in case end trying connect 100 nodes 1 after other.

i take @ creating @ known client node. client node has node.data set false, while total fellow member of cluster stores no info locally. both off-loads query processing nodes handling document indexing , provides beginnings of load balancing approach.

the data-less node has lower chance of failure, given software failure scenarios elasticsearch revolve around blowing out jvm heap , much less when doing query processing , not maintaining indexes. further, approach can extended type of local load balancer.

if run client node elasticsearch instance on application server provide local load balancing. node send out queries other nodes in cluster need included in specific query. , since software running on same server application software eliminate failure mode of node connecting failing while app server still up.

this architectural approach discussed in detail here:

https://blog.liip.ch/archive/2013/07/19/on-elasticsearch-performance.html

and bit more here on client nodes:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-node.html

alternatively, utilize native java elasticsearch api not utilize rest interface - allows java application connect fellow member node of cluster, in case know other nodes , able route queries right node. i'd take @ both client node , transport node approaches:

http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#node-client

http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#transport-client

java elasticsearch load-balancing jest

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -