# Http loadbalancers vs smart elasticsearch loadblalncers

**URL:** <https://discuss.elastic.co/t/http-loadbalancers-vs-smart-elasticsearch-loadblalncers/6157>\
**Category:** Elasticsearch\
**Created:** [December 14, 2011, 6:26am UTC](https://discuss.elastic.co/t/http-loadbalancers-vs-smart-elasticsearch-loadblalncers/6157 "2011-12-14T06:26:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piavlo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/piavlo/32/1214_2.png) [@Piavlo](https://discuss.elastic.co/u/Piavlo)\
**Post date:** [December 14, 2011, 6:26am UTC](https://discuss.elastic.co/t/http-loadbalancers-vs-smart-elasticsearch-loadblalncers/6157/1 "2011-12-14T06:26:59Z")

</div>

Hi,

There is elasticsearch cluster and app running on elastic size  
webfarm which need to access the elasticsearch cluster.

Initially I was thinking to run haproxy locally on each webserver in  
the farm.  
But running elasticsearch with no data as smart loadbalancer is very  
attractive.  
So I want to under stand if it's a good idea to run it in the  
following setup.

I want to run elasticsearch with node.data set to false on each  
webserver node.  
From documentation it is not clear which role these nodata  
elasticsearch nodes play in Gateway module recovery.

Say there is a cluster of 3 nodes with replication=1 and

gateway:  
type: local  
recover\_after\_nodes: 2  
recover\_after\_time: 1m  
expected\_nodes: 3

Since the nodata elasticsearch nodes is dynamic and it's also not  
clear if such nodes have effect on the recovery, is the above gateway  
configuration stays the same or should be changed?

Any other issues I need to consider?

Thanks  
Alex  
||||

---

<div class="post-metadata">

**Author:** ![Weiwei\_Wang](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@Weiwei\_Wang](https://discuss.elastic.co/u/Weiwei_Wang)\
**Post date:** [December 15, 2011, 5:42am UTC](https://discuss.elastic.co/t/http-loadbalancers-vs-smart-elasticsearch-loadblalncers/6157/2 "2011-12-15T05:42:44Z")

</div>

i use node(client=true) for my web service and it works fine.

According to the user guide, use this kind of es client can make index  
faster, but nothing mentioned about the query performance.

Another problem for this kind of usage is that if i shutdown the  
cluster using curl 'localhost:9200/\_shutdown' my app run under tomcat  
will also be shutdown and tomcat is also down:(

On Dec 14, 2:26 pm, Piavlo [lolitus...@gmail.com](mailto:lolitus...@gmail.com) wrote:

> Hi,
> 
> There is elasticsearch cluster and app running on elastic size  
> webfarm which need to access the elasticsearch cluster.
> 
> Initially I was thinking to run haproxy locally on each webserver in  
> the farm.  
> But running elasticsearch with no data as smart loadbalancer is very  
> attractive.  
> So I want to under stand if it's a good idea to run it in the  
> following setup.
> 
> I want to run elasticsearch with node.data set to false on each  
> webserver node.  
> From documentation it is not clear which role these nodata  
> elasticsearch nodes play in Gateway module recovery.
> 
> Say there is a cluster of 3 nodes with replication=1 and
> 
> gateway:  
> type: local  
> recover\_after\_nodes: 2  
> recover\_after\_time: 1m  
> expected\_nodes: 3
> 
> Since the nodata elasticsearch nodes is dynamic and it's also not  
> clear if such nodes have effect on the recovery, is the above gateway  
> configuration stays the same or should be changed?
> 
> Any other issues I need to consider?
> 
> Thanks  
> Alex  
> ||||

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 16, 2011, 3:39pm UTC](https://discuss.elastic.co/t/http-loadbalancers-vs-smart-elasticsearch-loadblalncers/6157/3 "2011-12-16T15:39:57Z")

</div>

In your "proxy" elasticsearch nodes you can either set:

node.client: true

Or

node.data: false  
node.master: false

(node.client is preferable).

They won't play a part in the recover\_after\_nodes / expected nodes setting  
in the gateway.

On Wed, Dec 14, 2011 at 8:26 AM, Piavlo [lolitushka@gmail.com](mailto:lolitushka@gmail.com) wrote:

> Hi,
> 
> There is elasticsearch cluster and app running on elastic size  
> webfarm which need to access the elasticsearch cluster.
> 
> Initially I was thinking to run haproxy locally on each webserver in  
> the farm.  
> But running elasticsearch with no data as smart loadbalancer is very  
> attractive.  
> So I want to under stand if it's a good idea to run it in the  
> following setup.
> 
> I want to run elasticsearch with node.data set to false on each  
> webserver node.  
> From documentation it is not clear which role these nodata  
> elasticsearch nodes play in Gateway module recovery.
> 
> Say there is a cluster of 3 nodes with replication=1 and
> 
> gateway:  
> type: local  
> recover\_after\_nodes: 2  
> recover\_after\_time: 1m  
> expected\_nodes: 3
> 
> Since the nodata elasticsearch nodes is dynamic and it's also not  
> clear if such nodes have effect on the recovery, is the above gateway  
> configuration stays the same or should be changed?
> 
> Any other issues I need to consider?
> 
> Thanks  
> Alex  
> ||||

---

<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 6, 2017, 3:45am UTC](https://discuss.elastic.co/t/http-loadbalancers-vs-smart-elasticsearch-loadblalncers/6157/4 "2017-07-06T03:45:13Z")

</div>

Closed on July 6, 2017, 3:45am UTC


