# Java client \<- aws discoverability -\> master node

**URL:** <https://discuss.elastic.co/t/java-client-aws-discoverability-master-node/10928>\
**Category:** Elasticsearch\
**Created:** [February 27, 2013, 3:54pm UTC](https://discuss.elastic.co/t/java-client-aws-discoverability-master-node/10928 "2013-02-27T15:54:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeNereson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikenereson/32/2632_2.png) [@MikeNereson](https://discuss.elastic.co/u/MikeNereson)\
**Post date:** [February 27, 2013, 3:54pm UTC](https://discuss.elastic.co/t/java-client-aws-discoverability-master-node/10928/1 "2013-02-27T15:54:24Z")

</div>

Today, we run a single ES node in AWS. Via Route 53, we give the node a URL  
that we use to access it. Our java web application, also running in AWS,  
uses the java API to create a client, and connect to the master ES node by  
URL.

AWS can be flaky sometime. Our ES node drops off or hardware locksup for  
unknown reasons.

Going forward, to improve stability, we want to bring add a couple  
additional nodes to the cluster. However, using our current setup, Route 53  
would still need to point to the master node, which is not going to provide  
us with an automated solution for keeping a stable cluster.

What I suspect needs to happen is that our web app, with the java client,  
needs to join the cluster via discoverability, rather than explicitly being  
added by URL. This should work as long as our ES nodes and AWS Elastic  
Beanstalk nodes are on the same AWS account. However, I don't see any does  
on the java API supporting EC2 discoverability.

Can the java client join the cluster via discoverability?

Thanks.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![drewr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drewr/32/7803_2.png) [@drewr](https://discuss.elastic.co/u/drewr)\
**Post date:** [February 27, 2013, 5:16pm UTC](https://discuss.elastic.co/t/java-client-aws-discoverability-master-node/10928/2 "2013-02-27T17:16:36Z")

</div>

MikeNereson wrote:

> Going forward, to improve stability, we want to bring add a couple  
> additional nodes to the cluster. However, using our current setup,  
> Route 53 would still need to point to the master node, which is not  
> going to provide us with an automated solution for keeping a stable  
> cluster.

You don't have to talk to the master node. Throw an ELB in front of  
the nodes and talk to its hostname. You shouldn't have to do any  
discovery in your app. Is that an option in your case?

-Drew

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Derry\_O\_Sullivan](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Derry\_O\_Sullivan](https://discuss.elastic.co/u/Derry_O_Sullivan)\
**Post date:** [February 27, 2013, 5:37pm UTC](https://discuss.elastic.co/t/java-client-aws-discoverability-master-node/10928/3 "2013-02-27T17:37:01Z")

</div>

Hey Mike,

I don't have much experience with setting up java clients via Route 53 but  
have had some experience with setting up a cluster across multiple geo  
zones. There were a few lessons learned in terms of using public vs private  
IP's from ES:  
[https://groups.google.com/d/msg/elasticsearch/Nm4qKjLChRE/1ovsZDyqfjkJ](https://groups.google.com/d/msg/elasticsearch/Nm4qKjLChRE/1ovsZDyqfjkJ)

I think once you have external access to the master node, ES should do the  
rest and be able to discover your cluster. Alternatively, you should be  
able to expose some of the code in the AWS plugin/EC2 api to do some work  
for you:

> **[GitHub - elastic/elasticsearch-cloud-aws: AWS Cloud Plugin for Elasticsearch](https://github.com/elastic/elasticsearch-cloud-aws)**
>
> AWS Cloud Plugin for Elasticsearch. Contribute to elastic/elasticsearch-cloud-aws development by creating an account on GitHub.

Derry

On Wednesday, 27 February 2013 15:54:24 UTC, MikeNereson wrote:

> Today, we run a single ES node in AWS. Via Route 53, we give the node a  
> URL that we use to access it. Our java web application, also running in  
> AWS, uses the java API to create a client, and connect to the master ES  
> node by URL.
> 
> AWS can be flaky sometime. Our ES node drops off or hardware locksup for  
> unknown reasons.
> 
> Going forward, to improve stability, we want to bring add a couple  
> additional nodes to the cluster. However, using our current setup, Route 53  
> would still need to point to the master node, which is not going to provide  
> us with an automated solution for keeping a stable cluster.
> 
> What I suspect needs to happen is that our web app, with the java client,  
> needs to join the cluster via discoverability, rather than explicitly being  
> added by URL. This should work as long as our ES nodes and AWS Elastic  
> Beanstalk nodes are on the same AWS account. However, I don't see any does  
> on the java API supporting EC2 discoverability.
> 
> Can the java client join the cluster via discoverability?
> 
> Thanks.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:49am UTC](https://discuss.elastic.co/t/java-client-aws-discoverability-master-node/10928/4 "2017-07-06T02:49:15Z")

</div>


