# ElasticSerach Cluster behind loadbalancer

**URL:** <https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286>\
**Category:** Elasticsearch\
**Created:** [June 24, 2014, 10:29am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286 "2014-06-24T10:29:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarun\_Jangra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_jangra/32/1426_2.png) [@Tarun\_Jangra](https://discuss.elastic.co/u/Tarun_Jangra)\
**Post date:** [June 24, 2014, 10:29am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/1 "2014-06-24T10:29:39Z")

</div>

hi guys,

Scenario1.

1. I have 3 es nodes.
2. I have not installed nginx,tomcat on elasticsearch nodes.
3. These are behind amazon elb.
4. cluster is detecting nodes automatically.

My need.

1. elb start putting queries on node when it is actually ready to take traffic. Usually shards reallocation takes time depending on the size of the shard.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 24, 2014, 10:32am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/2 "2014-06-24T10:32:06Z")

</div>

This is something you would need to co-ordinate outside of ES, there is  
nothing native that could do it.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 24 June 2014 20:29, Tarun Jangra [tarun@izap.in](mailto:tarun@izap.in) wrote:

> hi guys,
> 
> Scenario1.
> 
> 1. I have 3 es nodes.
> 2. I have not installed nginx,tomcat on elasticsearch nodes.
> 3. These are behind amazon elb.
> 4. cluster is detecting nodes automatically.
> 
> My need.
> 
> 1. elb start putting queries on node when it is actually ready to take  
> traffic. Usually shards reallocation takes time depending on the size of  
> the  
> shard.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/ElasticSerach-Cluster-behind-loadbalancer-tp4058369.html](http://elasticsearch-users.115913.n3.nabble.com/ElasticSerach-Cluster-behind-loadbalancer-tp4058369.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1403605780346-4058369.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1403605780346-4058369.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZGrss3kyubo2qQzrYk1NOZ4C\_1u8d68S1TGxavZUVW4Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZGrss3kyubo2qQzrYk1NOZ4C_1u8d68S1TGxavZUVW4Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tarun\_Jangra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_jangra/32/1426_2.png) [@Tarun\_Jangra](https://discuss.elastic.co/u/Tarun_Jangra)\
**Post date:** [June 24, 2014, 10:39am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/3 "2014-06-24T10:39:24Z")

</div>

Thanks mark,

how if node starts getting queries during this reallocating period. Is there anything i am suppose to loose? Like write can also occur during reallocations.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 24, 2014, 10:41am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/4 "2014-06-24T10:41:20Z")

</div>

Yes they can both occur in parallel, performance may drop a little but it  
will still respond to queries and indexing.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 24 June 2014 20:39, Tarun Jangra [tarun@izap.in](mailto:tarun@izap.in) wrote:

> Thanks mark,
> 
> how if node starts getting queries during this reallocating period. Is  
> there  
> anything i am suppose to loose? Like write can also occur during  
> reallocations.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/ElasticSerach-Cluster-behind-loadbalancer-tp4058369p4058372.html](http://elasticsearch-users.115913.n3.nabble.com/ElasticSerach-Cluster-behind-loadbalancer-tp4058369p4058372.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1403606364842-4058372.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1403606364842-4058372.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624aHie7k8fWFEqeMNtAH8i3SaHF5sfPEE3WE1Z5koNR2Pg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624aHie7k8fWFEqeMNtAH8i3SaHF5sfPEE3WE1Z5koNR2Pg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tarun\_Jangra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_jangra/32/1426_2.png) [@Tarun\_Jangra](https://discuss.elastic.co/u/Tarun_Jangra)\
**Post date:** [June 24, 2014, 10:44am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/5 "2014-06-24T10:44:29Z")

</div>

In that case, i don't think i should bother if node is up and reallocation is done.

---

<div class="post-metadata">

**Author:** ![Himanshu\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@Himanshu\_Agrawal](https://discuss.elastic.co/u/Himanshu_Agrawal)\
**Post date:** [June 24, 2014, 10:55am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/6 "2014-06-24T10:55:09Z")

</div>

Hi Tarun,

You can use ELB ping functionality along with a custom elasticsearch plugin  
to achieve this functionality. You can configure your ping path to be  
something like /\_plugin/\<custom\_pluginname\> and write your plugin in such a  
way that it returns HTTP 200 only when you want your node to serve the  
traffic and HTTP 503/500 when you don't want the node to serve traffic.

See

> **[Deploying a high-availability Drupal website with an external Amazon RDS...](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-hadrupal-tutorial.html)**
>
> Example of how to deploy your sample Drupal website to Elastic Beanstalk and manage an RDS database instance.

for more details on ELB pings and

> **[Troubleshoot a Classic Load Balancer: Health checks - Elastic Load Balancing](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ts-elb-healthcheck.html)**
>
> Troubleshoot failed health checks for your Classic Load Balancer.

for troubleshooting.

Thanks,  
Himanshu.

On Tue, Jun 24, 2014 at 4:14 PM, Tarun Jangra [tarun@izap.in](mailto:tarun@izap.in) wrote:

> In that case, i don't think i should bother if node is up and reallocation  
> is  
> done.
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/ElasticSerach-Cluster-behind-loadbalancer-tp4058369p4058375.html](http://elasticsearch-users.115913.n3.nabble.com/ElasticSerach-Cluster-behind-loadbalancer-tp4058369p4058375.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1403606669657-4058375.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1403606669657-4058375.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CACTSS%3D57q3W35%2BeUZZrpLar5D1hvs7F5%2BrTa%2BXWH6B-j8MiLxw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACTSS%3D57q3W35%2BeUZZrpLar5D1hvs7F5%2BrTa%2BXWH6B-j8MiLxw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tarun\_Jangra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarun_jangra/32/1426_2.png) [@Tarun\_Jangra](https://discuss.elastic.co/u/Tarun_Jangra)\
**Post date:** [June 24, 2014, 11:02am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/7 "2014-06-24T11:02:52Z")

</div>

hi himanshu,

Well currently i've used /\_cluster/health for this. And since elb suppose to execute as per IP. And once i start getting response. I means it is up. But it is not identifying reallocating shard process.

I like your idea. that plugin can be programmed in such a way. that it should start sending HTTP 200 only when node has done sharding etc.

Thank you.

---

<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, 1:20am UTC](https://discuss.elastic.co/t/elasticserach-cluster-behind-loadbalancer/18286/8 "2017-07-06T01:20:15Z")

</div>

Closed on July 6, 2017, 1:20am UTC


