REST plugin invocation on multi-node cluster

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

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?