# REST plugin invocation on multi-node cluster

**URL:** <https://discuss.elastic.co/t/rest-plugin-invocation-on-multi-node-cluster/50176>\
**Category:** Elasticsearch\
**Created:** [May 17, 2016, 4:21am UTC](https://discuss.elastic.co/t/rest-plugin-invocation-on-multi-node-cluster/50176 "2016-05-17T04:21:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [May 17, 2016, 4:21am UTC](https://discuss.elastic.co/t/rest-plugin-invocation-on-multi-node-cluster/50176/1 "2016-05-17T04:21:47Z")

</div>

I have created a custom REST plugin by extending BaseRestHandler. Initially there was only one node cluster we used Java's HttpURLConnection for invoking plugin functionality. Now we have 2-node cluster and plugin is installed on both the nodes. Also, the cluster is formed and nodes are discovered after changing elasticsearch.yml file .

But for load balancing of custom plugin invocation is there any built-in plugin or elastic search feature available and it should also switch node when one node goes down

The approach I am following now is connect one node over HTTP and if the connection fails then connect other. Is there any other better solution?

Thanks,  
Chetana

---

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [May 18, 2016, 10:06am UTC](https://discuss.elastic.co/t/rest-plugin-invocation-on-multi-node-cluster/50176/2 "2016-05-18T10:06:13Z")

</div>

The approach I am following now is connect one node over HTTP and if the connection fails then connect other. Is there any other better solution?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:50pm UTC](https://discuss.elastic.co/t/rest-plugin-invocation-on-multi-node-cluster/50176/3 "2017-07-05T22:50:45Z")

</div>


