# Node client as load balancer node

**URL:** <https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514>\
**Category:** Elasticsearch\
**Created:** [December 17, 2015, 9:59pm UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514 "2015-12-17T21:59:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [December 17, 2015, 9:59pm UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514/1 "2015-12-17T21:59:49Z")

</div>

Hi I'm building a micro service using the native Java Node Client. The client is set to data = false and http = false because I want my user to go through my micro service. The Elasticsearch data nodes HTTP is disabled.

Do we get the same advantages from the node client as mentioned here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html)

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [December 18, 2015, 4:58pm UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514/2 "2015-12-18T16:58:34Z")

</div>

Yes, but I would also set master to false, otherwise that node can be elected as master, which is not good given that it is embedded in your application. In general, I would try to avoid using embedded client nodes though, as they do much more than a normal client (reduce phase in search, they hold the cluster state etc.). I would rather use the transport client in your application which connects to a separate process, possibly on the same machine as your application, that is the actual client node that joins the cluster. That way the client node would be more isolated and independent from your application.

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [December 19, 2015, 2:02am UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514/3 "2015-12-19T02:02:26Z")

</div>

But as transport client would it do the scatter gather portion?

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [December 21, 2015, 9:21am UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514/4 "2015-12-21T09:21:18Z")

</div>

The tranport client would do the round robin across the nodes it knows about. No scatter gather, that is a pure client, as opposed as the node client which does more. hope this clarifies things.

---

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [December 21, 2015, 3:17pm UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514/5 "2015-12-21T15:17:21Z")

</div>

Thanks

---

<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, 11:29pm UTC](https://discuss.elastic.co/t/node-client-as-load-balancer-node/37514/6 "2017-07-05T23:29:32Z")

</div>


