# Clustering across co-locations

**URL:** <https://discuss.elastic.co/t/clustering-across-co-locations/8911>\
**Category:** Elasticsearch\
**Created:** [August 31, 2012, 11:42pm UTC](https://discuss.elastic.co/t/clustering-across-co-locations/8911 "2012-08-31T23:42:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Warren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craig_warren/32/2740_2.png) [@Craig\_Warren](https://discuss.elastic.co/u/Craig_Warren)\
**Post date:** [August 31, 2012, 11:42pm UTC](https://discuss.elastic.co/t/clustering-across-co-locations/8911/1 "2012-08-31T23:42:45Z")

</div>

Hi,

I'm currently evaluating ElasticSearch to see if it fits our needs. One  
major requirement is to have our index available in 2  
geographic co-locations, but also minimize the internet traffic between  
these locations.

I want to be able to have ES clients in each location execute their queries  
only on the nodes in the local network. Is there a way to configure the  
cluster for this? This would require co-location's node set having each  
shard or it's replica, and restricting where the query can run.

Is this possible to configure, and if so, how?

Thanks!

--

---

<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:** [September 3, 2012, 5:51am UTC](https://discuss.elastic.co/t/clustering-across-co-locations/8911/2 "2012-09-03T05:51:58Z")

</div>

Hi Craig,

I think what you can do here is to split your data in two indices - one per  
location - although you can easily search in both if you want to. Then,  
keep each index within the limits of its location by Shard Allocation  
settings:

> **[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.

After doing that, data shouldn't migrate between locations, and you could  
enable clients to search only in one of the two indices.

On Saturday, September 1, 2012 2:42:45 AM UTC+3, Craig Warren wrote:

> Hi,
> 
> I'm currently evaluating Elasticsearch to see if it fits our needs. One  
> major requirement is to have our index available in 2  
> geographic co-locations, but also minimize the internet traffic between  
> these locations.
> 
> I want to be able to have ES clients in each location execute their  
> queries only on the nodes in the local network. Is there a way to configure  
> the cluster for this? This would require co-location's node set having each  
> shard or it's replica, and restricting where the query can run.
> 
> Is this possible to configure, and if so, how?
> 
> Thanks!

--

---

<div class="post-metadata">

**Author:** ![Craig\_Warren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/craig_warren/32/2740_2.png) [@Craig\_Warren](https://discuss.elastic.co/u/Craig_Warren)\
**Post date:** [September 3, 2012, 5:58pm UTC](https://discuss.elastic.co/t/clustering-across-co-locations/8911/3 "2012-09-03T17:58:39Z")

</div>

Thanks Radu, that looks like exactly what I needed.

On Sunday, 2 September 2012 22:51:58 UTC-7, Radu Gheorghe wrote:

> Hi Craig,
> 
> I think what you can do here is to split your data in two indices - one  
> per location - although you can easily search in both if you want to. Then,  
> keep each index within the limits of its location by Shard Allocation  
> settings:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/allocation.html)
> 
> After doing that, data shouldn't migrate between locations, and you could  
> enable clients to search only in one of the two indices.
> 
> On Saturday, September 1, 2012 2:42:45 AM UTC+3, Craig Warren wrote:
> 
> > Hi,
> > 
> > I'm currently evaluating Elasticsearch to see if it fits our needs. One  
> > major requirement is to have our index available in 2  
> > geographic co-locations, but also minimize the internet traffic between  
> > these locations.
> > 
> > I want to be able to have ES clients in each location execute their  
> > queries only on the nodes in the local network. Is there a way to configure  
> > the cluster for this? This would require co-location's node set having each  
> > shard or it's replica, and restricting where the query can run.
> > 
> > Is this possible to configure, and if so, how?
> > 
> > Thanks!

--

---

<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:14am UTC](https://discuss.elastic.co/t/clustering-across-co-locations/8911/4 "2017-07-06T03:14:14Z")

</div>


