# In memory node with guaranteed local data

**URL:** <https://discuss.elastic.co/t/in-memory-node-with-guaranteed-local-data/9318>\
**Category:** Elasticsearch\
**Created:** [October 11, 2012, 2:05pm UTC](https://discuss.elastic.co/t/in-memory-node-with-guaranteed-local-data/9318 "2012-10-11T14:05:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pascal\_Friederich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pascal_friederich/32/2680_2.png) [@Pascal\_Friederich](https://discuss.elastic.co/u/Pascal_Friederich)\
**Post date:** [October 11, 2012, 2:05pm UTC](https://discuss.elastic.co/t/in-memory-node-with-guaranteed-local-data/9318/1 "2012-10-11T14:05:44Z")

</div>

TL;DR: Is there a way to reliably guarantee that a local node has all the  
data of an index locally in memory?

We have a very time critical application (search times \> 5-10 ms are a real  
problem for us). To keep search as fast as possible we figured the best way  
would be to use a node in the same process to eliminate network latency and  
also being as self contained as possible.  
That's working out nicely, so far, except that we have to manually change  
the number\_of\_replicas every time we add or remove a node to the cluster.  
We actually don't want to mess with the replica settings at all.  
We just want our local nodes to join the cluster, grab \*all \*the data for  
the index so we never ever have to ask additional nodes again.

Bonus question: are there any performance does and don'ts hints / links /  
blogposts / best practices you could recommend?

thank you!

--

---

<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:** [October 11, 2012, 3:06pm UTC](https://discuss.elastic.co/t/in-memory-node-with-guaranteed-local-data/9318/2 "2012-10-11T15:06:34Z")

</div>

If I understood your question correctly, you can set index.auto\_expand\_replicas to all, in which case it will make sure to place replicas automatically on all the data nodes based on the current data nodes in the cluster.

On Oct 11, 2012, at 7:05 AM, Pascal Friederich [paukul@gmail.com](mailto:paukul@gmail.com) wrote:

> TL;DR: Is there a way to reliably guarantee that a local node has all the data of an index locally in memory?
> 
> We have a very time critical application (search times \> 5-10 ms are a real problem for us). To keep search as fast as possible we figured the best way would be to use a node in the same process to eliminate network latency and also being as self contained as possible.  
> That's working out nicely, so far, except that we have to manually change the number\_of\_replicas every time we add or remove a node to the cluster.  
> We actually don't want to mess with the replica settings at all.  
> We just want our local nodes to join the cluster, grab all the data for the index so we never ever have to ask additional nodes again.
> 
> Bonus question: are there any performance does and don'ts hints / links / blogposts / best practices you could recommend?
> 
> thank you!
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Pascal\_Friederich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pascal_friederich/32/2680_2.png) [@Pascal\_Friederich](https://discuss.elastic.co/u/Pascal_Friederich)\
**Post date:** [October 11, 2012, 4:05pm UTC](https://discuss.elastic.co/t/in-memory-node-with-guaranteed-local-data/9318/3 "2012-10-11T16:05:57Z")

</div>

perfect, thanks. I actually saw that option but didn't make the  
connection...

On Thursday, October 11, 2012 5:06:36 PM UTC+2, kimchy wrote:

> If I understood your question correctly, you can  
> set index.auto\_expand\_replicas to all, in which case it will make sure to  
> place replicas automatically on all the data nodes based on the current  
> data nodes in the cluster.
> 
> On Oct 11, 2012, at 7:05 AM, Pascal Friederich \<[pau...@gmail.com](mailto:pau...@gmail.com)\<javascript:\>\>  
> wrote:
> 
> TL;DR: Is there a way to reliably guarantee that a local node has all the  
> data of an index locally in memory?
> 
> We have a very time critical application (search times \> 5-10 ms are a  
> real problem for us). To keep search as fast as possible we figured the  
> best way would be to use a node in the same process to eliminate network  
> latency and also being as self contained as possible.  
> That's working out nicely, so far, except that we have to manually change  
> the number\_of\_replicas every time we add or remove a node to the cluster.  
> We actually don't want to mess with the replica settings at all.  
> We just want our local nodes to join the cluster, grab \*all \*the data for  
> the index so we never ever have to ask additional nodes again.
> 
> Bonus question: are there any performance does and don'ts hints / links /  
> blogposts / best practices you could recommend?
> 
> thank you!
> 
> --

--

---

<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:09am UTC](https://discuss.elastic.co/t/in-memory-node-with-guaranteed-local-data/9318/4 "2017-07-06T03:09:19Z")

</div>


