# Should memcached be used with ES?

**URL:** <https://discuss.elastic.co/t/should-memcached-be-used-with-es/8695>\
**Category:** Elasticsearch\
**Created:** [August 9, 2012, 7:59pm UTC](https://discuss.elastic.co/t/should-memcached-be-used-with-es/8695 "2012-08-09T19:59:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![curious](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@curious](https://discuss.elastic.co/u/curious)\
**Post date:** [August 9, 2012, 7:59pm UTC](https://discuss.elastic.co/t/should-memcached-be-used-with-es/8695/1 "2012-08-09T19:59:58Z")

</div>

Is it a good practice to use "Memcached" with ES, or would the built-in  
"Node Filter Cache" provide sufficient caching?

---

<div class="post-metadata">

**Author:** ![Iftekharul\_Haque](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@Iftekharul\_Haque](https://discuss.elastic.co/u/Iftekharul_Haque)\
**Post date:** [August 10, 2012, 10:42pm UTC](https://discuss.elastic.co/t/should-memcached-be-used-with-es/8695/2 "2012-08-10T22:42:31Z")

</div>

Just a caveat that you probably already know, but caching should only  
be used when absolutely needed. If you're coming up against  
performance issues, you'll probably be looking at a host of other  
solutions (upping the number of nodes, or improving your queries and  
index structure, for example) before considering caching.

But if you're bent on caching, then memcached is probably as good as  
any other caching solution. ES would be mostly blind to any external  
caching you use in which case what caching solution is easily  
available to you, what you are more familiar with, and what is more in  
tune with your needs is more important than any 'good practice'  
considerations in that context.

- Ifty.

On Thu, Aug 9, 2012 at 9:59 PM, curious [springdalian@gmail.com](mailto:springdalian@gmail.com) wrote:

> Is it a good practice to use "Memcached" with ES, or would the built-in  
> "Node Filter Cache" provide sufficient caching?

--

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [August 11, 2012, 2:16pm UTC](https://discuss.elastic.co/t/should-memcached-be-used-with-es/8695/3 "2012-08-11T14:16:50Z")

</div>

The best thing is to keep your Elasticsearch index in memory, and to avoid  
double-caching.

Memcached is for dynamic web sites where pages are built so slow from  
backend systems that the request rate exceed it. As it is for pages and  
objects in a web server, I don't see a reason for using it with  
Elasticsearch.

But, if you do things wrong, you can force Elasticsearch queries to become  
slow in your app, so you need tricks to satisy high query rates, as with  
every other search engine or backend, too. In most cases, caching results  
of badly designed queries should not be preferred because it does not solve  
the real problem.

Best regards,

Jörg

On Thursday, August 9, 2012 9:59:58 PM UTC+2, curious wrote:

> Is it a good practice to use "Memcached" with ES, or would the built-in  
> "Node Filter Cache" provide sufficient caching?

--

---

<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:16am UTC](https://discuss.elastic.co/t/should-memcached-be-used-with-es/8695/4 "2017-07-06T03:16:43Z")

</div>


