# Client to cluster acces design

**URL:** <https://discuss.elastic.co/t/client-to-cluster-acces-design/6141>\
**Category:** Elasticsearch\
**Created:** [December 13, 2011, 3:06pm UTC](https://discuss.elastic.co/t/client-to-cluster-acces-design/6141 "2011-12-13T15:06:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damien\_Hardy](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@Damien\_Hardy](https://discuss.elastic.co/u/Damien_Hardy)\
**Post date:** [December 13, 2011, 3:06pm UTC](https://discuss.elastic.co/t/client-to-cluster-acces-design/6141/1 "2011-12-13T15:06:33Z")

</div>

Hello,

We are wondering about the best design for a client to address an ES  
cluster.

1. The client app knows only an URL of the loadbalancer like haproxy which  
roundrobin request on each nodes (it is the SPOF so you have to handle that)

2. The client app implement a local elasticsearch beside node without data  
that join the active cluster and the app query the local ES. (maybe 2 or 3  
main nodes have to be knows to jojn the whole cluster)

3. The client knows a lists of ES node to address via client implementation

Cheers,

--  
Damien

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [December 13, 2011, 8:42pm UTC](https://discuss.elastic.co/t/client-to-cluster-acces-design/6141/2 "2011-12-13T20:42:28Z")

</div>

Hi,

I think you can learn many answers by reading [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/java-api/client.html)

1. It is possible but to me it seems like extra work that is not necessary (see #2 and #3 as both options are provided by ES out of the box)
2. This is Node client
3. This is Transport client

--  
Regards,  
Lukas

On Tuesday, December 13, 2011 at 4:06 PM, Damien Hardy wrote:

> Hello,
> 
> We are wondering about the best design for a client to address an ES cluster.
> 
> 1. The client app knows only an URL of the loadbalancer like haproxy which roundrobin request on each nodes (it is the SPOF so you have to handle that)
> 
> 2. The client app implement a local elasticsearch beside node without data that join the active cluster and the app query the local ES. (maybe 2 or 3 main nodes have to be knows to jojn the whole cluster)
> 
> 3. The client knows a lists of ES node to address via client implementation
> 
> Cheers,
> 
> --  
> Damien

---

<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 13, 2011, 10:58pm UTC](https://discuss.elastic.co/t/client-to-cluster-acces-design/6141/3 "2011-12-13T22:58:19Z")

</div>

Lukas answered for the Java client case, but I assume you are talking about  
the HTTP based case? I like 3, where the client has a list of URLs (there  
is a nice discussion about it on Tire (ruby client)), though 2 is a valid  
option as well, start an elasticsearch node that holds no data and is not  
an eligible master on your local box, and only talk to it. It will join the  
cluster and know about the rest of the nodes.

On Tue, Dec 13, 2011 at 5:06 PM, Damien Hardy [damienhardy.bal@gmail.com](mailto:damienhardy.bal@gmail.com)wrote:

> Hello,
> 
> We are wondering about the best design for a client to address an ES  
> cluster.
> 
> 1. The client app knows only an URL of the loadbalancer like haproxy which  
> roundrobin request on each nodes (it is the SPOF so you have to handle that)
> 
> 2. The client app implement a local elasticsearch beside node without data  
> that join the active cluster and the app query the local ES. (maybe 2 or 3  
> main nodes have to be knows to jojn the whole cluster)
> 
> 3. The client knows a lists of ES node to address via client  
> implementation
> 
> Cheers,
> 
> --  
> Damien

---

<div class="post-metadata">

**Author:** ![Damien\_Hardy](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@Damien\_Hardy](https://discuss.elastic.co/u/Damien_Hardy)\
**Post date:** [December 14, 2011, 10:38am UTC](https://discuss.elastic.co/t/client-to-cluster-acces-design/6141/4 "2011-12-14T10:38:57Z")

</div>

Hello,

Thank you both for answer,

And yes I mainlly was thinking about non-java centric clients apps 🙂  
In the third we have olso to deal with defunct/mising ES nodes that is  
managed by a beside private ES data-less node ( solution 2 )

Cheers,

--  
Damien

2011/12/13 Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com)

> Lukas answered for the Java client case, but I assume you are talking  
> about the HTTP based case? I like 3, where the client has a list of URLs  
> (there is a nice discussion about it on Tire (ruby client)), though 2 is a  
> valid option as well, start an elasticsearch node that holds no data and is  
> not an eligible master on your local box, and only talk to it. It will join  
> the cluster and know about the rest of the nodes.
> 
> On Tue, Dec 13, 2011 at 5:06 PM, Damien Hardy [damienhardy.bal@gmail.com](mailto:damienhardy.bal@gmail.com)wrote:
> 
> > Hello,
> > 
> > We are wondering about the best design for a client to address an ES  
> > cluster.
> > 
> > 1. The client app knows only an URL of the loadbalancer like haproxy  
> > which roundrobin request on each nodes (it is the SPOF so you have to  
> > handle that)
> > 
> > 2. The client app implement a local elasticsearch beside node without  
> > data that join the active cluster and the app query the local ES. (maybe 2  
> > or 3 main nodes have to be knows to jojn the whole cluster)
> > 
> > 3. The client knows a lists of ES node to address via client  
> > implementation
> > 
> > Cheers,
> > 
> > --  
> > Damien

---

<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/client-to-cluster-acces-design/6141/5 "2017-07-06T03:45:24Z")

</div>


