# Elasticsearch in a federated mode

**URL:** <https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847>\
**Category:** Elasticsearch\
**Created:** [March 1, 2012, 7:02am UTC](https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847 "2012-03-01T07:02:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajan](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ajan](https://discuss.elastic.co/u/ajan)\
**Post date:** [March 1, 2012, 7:02am UTC](https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847/1 "2012-03-01T07:02:03Z")

</div>

I have a requirement to analyze on how elasticsearch be used in  
federation.

Let me try to explain;

Lets say, as a part of a big enterprise, I have a ES cluster - ES001  
with 3 nodes, using the default configurations of 1 replica and 2  
shards deployed in LA, USA. Another ES cluster - ES002 with the same  
configuration as ES001 deployed at Cork, Ireland.

Is there a way to synchronize between these 2 clusters? I'm not  
talking about data replication, can a search query on cluster ES001 be  
directed to ES002 based on some parameter?

With best regards,  
Afzal Jan

---

<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:** [March 1, 2012, 12:35pm UTC](https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847/2 "2012-03-01T12:35:52Z")

</div>

?. You code issues the search request, you can decide which one to hit.

On Thursday, March 1, 2012 at 9:02 AM, ajan wrote:

> I have a requirement to analyze on how elasticsearch be used in  
> federation.
> 
> Let me try to explain;
> 
> Lets say, as a part of a big enterprise, I have a ES cluster - ES001  
> with 3 nodes, using the default configurations of 1 replica and 2  
> shards deployed in LA, USA. Another ES cluster - ES002 with the same  
> configuration as ES001 deployed at Cork, Ireland.
> 
> Is there a way to synchronize between these 2 clusters? I'm not  
> talking about data replication, can a search query on cluster ES001 be  
> directed to ES002 based on some parameter?
> 
> With best regards,  
> Afzal Jan

---

<div class="post-metadata">

**Author:** ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)\
**Post date:** [March 2, 2012, 2:17pm UTC](https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847/3 "2012-03-02T14:17:17Z")

</div>

I suppose you want to run queries as if it was one cluster, but insert  
data only on the local nodes, and not migrate data between different  
locations.

If that's the case, you could also search both clusters and aggregate  
the results in your app. Or, you can put all nodes in the same ES  
cluster, and use shard allocation to make sure local data gets indexed  
in local nodes.

In case you find out other options, I'd be really interested 😃

On Mar 1, 2:35 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> ?. You code issues the search request, you can decide which one to hit.
> 
> On Thursday, March 1, 2012 at 9:02 AM, ajan wrote:
> 
> > I have a requirement to analyze on how elasticsearch be used in  
> > federation.
> 
> > Let me try to explain;
> 
> > Lets say, as a part of a big enterprise, I have a ES cluster - ES001  
> > with 3 nodes, using the default configurations of 1 replica and 2  
> > shards deployed in LA, USA. Another ES cluster - ES002 with the same  
> > configuration as ES001 deployed at Cork, Ireland.
> 
> > Is there a way to synchronize between these 2 clusters? I'm not  
> > talking about data replication, can a search query on cluster ES001 be  
> > directed to ES002 based on some parameter?
> 
> > With best regards,  
> > Afzal Jan

---

<div class="post-metadata">

**Author:** ![Radu\_Gheorghe1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe1/32/2688_2.png) [@Radu\_Gheorghe1](https://discuss.elastic.co/u/Radu_Gheorghe1)\
**Post date:** [March 2, 2012, 5:17pm UTC](https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847/4 "2012-03-02T17:17:41Z")

</div>

On Mar 2, 4:17 pm, Radu Gheorghe [radu0gheor...@gmail.com](mailto:radu0gheor...@gmail.com) wrote:

> I suppose you want to run queries as if it was one cluster, but insert  
> data only on the local nodes, and not migrate data between different  
> locations.
> 
> If that's the case, you could also search both clusters and aggregate  
> the results in your app. Or, you can put all nodes in the same ES  
> cluster, and use shard allocation to make sure local data gets indexed  
> in local nodes.

Sorry, that would be "Shard Allocation Filtering". See here:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> In case you find out other options, I'd be really interested 😃
> 
> On Mar 1, 2:35 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > ?. You code issues the search request, you can decide which one to hit.
> 
> > On Thursday, March 1, 2012 at 9:02 AM, ajan wrote:
> > 
> > > I have a requirement to analyze on how elasticsearch be used in  
> > > federation.
> 
> > > Let me try to explain;
> 
> > > Lets say, as a part of a big enterprise, I have a ES cluster - ES001  
> > > with 3 nodes, using the default configurations of 1 replica and 2  
> > > shards deployed in LA, USA. Another ES cluster - ES002 with the same  
> > > configuration as ES001 deployed at Cork, Ireland.
> 
> > > Is there a way to synchronize between these 2 clusters? I'm not  
> > > talking about data replication, can a search query on cluster ES001 be  
> > > directed to ES002 based on some parameter?
> 
> > > With best regards,  
> > > Afzal Jan

---

<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:37am UTC](https://discuss.elastic.co/t/elasticsearch-in-a-federated-mode/6847/5 "2017-07-06T03:37:33Z")

</div>


