# Precise shard routing, remote document specific nodes

**URL:** <https://discuss.elastic.co/t/precise-shard-routing-remote-document-specific-nodes/7842>\
**Category:** Elasticsearch\
**Created:** [May 24, 2012, 2:37pm UTC](https://discuss.elastic.co/t/precise-shard-routing-remote-document-specific-nodes/7842 "2012-05-24T14:37:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steeve\_Morin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steeve_morin/32/2876_2.png) [@Steeve\_Morin](https://discuss.elastic.co/u/Steeve_Morin)\
**Post date:** [May 24, 2012, 2:37pm UTC](https://discuss.elastic.co/t/precise-shard-routing-remote-document-specific-nodes/7842/1 "2012-05-24T14:37:02Z")

</div>

Hi guys!

One of my clients wants to have local nodes of the index. Just in case our  
server go down.

Let me explain: say I have an index, call it "documents", spread of 20  
shards, 5 nodes.  
I want 2 of the nodes to be local to my client, and the remaining 3 local  
to me. But.  
I want their node to only contain their documents, and the remaining 3 to  
contain all the other clients.

Is that possible without having to push the documents on 2 different  
clusters (2 + 3)?  
I thought about explicit shard routing, but I'm not sure how to  
specifically route on the shard  
(as I believe routing is done via hashing then modding on the complete  
keyspace, which would  
be "random", but also guarantees no hotspots on the cluster).

How would you do that?  
Steeve

---

<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:** [May 29, 2012, 6:09pm UTC](https://discuss.elastic.co/t/precise-shard-routing-remote-document-specific-nodes/7842/2 "2012-05-29T18:09:41Z")

</div>

I am not sure I completely follow the question, but it does not seem like  
routing would help much here..., how about a local index and a remote index?

On Thu, May 24, 2012 at 4:37 PM, Steeve Morin [steeve.morin@gmail.com](mailto:steeve.morin@gmail.com)wrote:

> Hi guys!
> 
> One of my clients wants to have local nodes of the index. Just in case our  
> server go down.
> 
> Let me explain: say I have an index, call it "documents", spread of 20  
> shards, 5 nodes.  
> I want 2 of the nodes to be local to my client, and the remaining 3 local  
> to me. But.  
> I want their node to only contain their documents, and the remaining 3 to  
> contain all the other clients.
> 
> Is that possible without having to push the documents on 2 different  
> clusters (2 + 3)?  
> I thought about explicit shard routing, but I'm not sure how to  
> specifically route on the shard  
> (as I believe routing is done via hashing then modding on the complete  
> keyspace, which would  
> be "random", but also guarantees no hotspots on the cluster).
> 
> How would you do that?  
> Steeve

---

<div class="post-metadata">

**Author:** ![Daniel\_Winterstein](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_winterstein/32/1442_2.png) [@Daniel\_Winterstein](https://discuss.elastic.co/u/Daniel_Winterstein)\
**Post date:** [April 22, 2014, 8:17pm UTC](https://discuss.elastic.co/t/precise-shard-routing-remote-document-specific-nodes/7842/3 "2014-04-22T20:17:22Z")

</div>

Hello,

I have a similar requirement for some documents to be stored only on the  
local node.

A local index as @Kimchy suggests sounds like a good solution -- but how do  
you create one?

Thank you,

- Daniel

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d622db36-1979-4662-8c6a-847040a87207%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d622db36-1979-4662-8c6a-847040a87207%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:34am UTC](https://discuss.elastic.co/t/precise-shard-routing-remote-document-specific-nodes/7842/4 "2017-07-06T01:34:15Z")

</div>


