# Multiple cluster

**URL:** <https://discuss.elastic.co/t/multiple-cluster/8120>\
**Category:** Elasticsearch\
**Created:** [June 15, 2012, 1:52pm UTC](https://discuss.elastic.co/t/multiple-cluster/8120 "2012-06-15T13:52:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henri\_K](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@Henri\_K](https://discuss.elastic.co/u/Henri_K)\
**Post date:** [June 15, 2012, 1:52pm UTC](https://discuss.elastic.co/t/multiple-cluster/8120/1 "2012-06-15T13:52:23Z")

</div>

Hey,

i'm using ElasticSearch for Fulltextsearch.  
Now there is the problem, that i want to have a TransportClient to 2  
different ElasticSearch Clusters. But i have no idea to solve this problem.

Is there any possibility

Thanks for Help

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 15, 2012, 4:11pm UTC](https://discuss.elastic.co/t/multiple-cluster/8120/2 "2012-06-15T16:11:48Z")

</div>

I would create two different TransportClients and specify a different  
cluster.name in the individual settings.

--  
Ivan

On Fri, Jun 15, 2012 at 6:52 AM, Henri K. [hknochi@googlemail.com](mailto:hknochi@googlemail.com) wrote:

> Hey,
> 
> i'm using Elasticsearch for Fulltextsearch.  
> Now there is the problem, that i want to have a TransportClient to 2  
> different Elasticsearch Clusters. But i have no idea to solve this problem.
> 
> Is there any possibility
> 
> Thanks for Help

---

<div class="post-metadata">

**Author:** ![Henri\_K](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@Henri\_K](https://discuss.elastic.co/u/Henri_K)\
**Post date:** [June 15, 2012, 6:03pm UTC](https://discuss.elastic.co/t/multiple-cluster/8120/3 "2012-06-15T18:03:18Z")

</div>

Ok i have forgotten to say, it is planned as a Controller.

the Application should connect to this controller and this should decide  
which of the both clusters should be used.

i hope this description is much more better

Am Freitag, 15. Juni 2012 18:11:48 UTC+2 schrieb Ivan Brusic:

> I would create two different TransportClients and specify a different  
> cluster.name in the individual settings.

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 15, 2012, 11:53pm UTC](https://discuss.elastic.co/t/multiple-cluster/8120/4 "2012-06-15T23:53:33Z")

</div>

Now you are getting into more of an internal design question than an  
Elasticsearch question.

AFAIK, each TransportClient is tied to a specific cluster via the  
settings. You would need to maintain a pool of TransportClient  
instances yourself. You can have some type of Factory/Provider class  
that controls which TransportClient is returned.

--  
Ivan

On Fri, Jun 15, 2012 at 11:03 AM, Henri K. [hknochi@googlemail.com](mailto:hknochi@googlemail.com) wrote:

> Ok i have forgotten to say, it is planned as a Controller.
> 
> the Application should connect to this controller and this should decide  
> which of the both clusters should be used.
> 
> i hope this description is much more better
> 
> Am Freitag, 15. Juni 2012 18:11:48 UTC+2 schrieb Ivan Brusic:
> 
> > I would create two different TransportClients and specify a different  
> > cluster.name in the individual settings.

---

<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:23am UTC](https://discuss.elastic.co/t/multiple-cluster/8120/5 "2017-07-06T03:23:47Z")

</div>


