Memcache support #24

Open
cweagans opened this Issue Jan 19, 2012 · 3 comments

Comments

Projects
None yet
2 participants

I noticed that you were interested in adding memcache support. There's a very very easy way to do this in Ubuntu and maybe Debian (not sure about other distros):

Just put your page cache somewhere inside /dev/shm. Read more about it here: http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html

Very easy to understand and implement!

Owner

perusio commented Jan 19, 2012

Yes you can do it with Nginx based file cache: mount the cache dir on /dev/shm using tmpfs. But by memcache I mean the backend that Nginx provides. It can work as a first or a second layer after the Nginx cache. Also it automatically fixes the issues with expirations. What is missing is some time to core dump the memcache and see how the keys are built by the Drupal memcache backend and do it on the config.

I'm leaving this open as reminder.

Thanks

Why would you want to have multiple layers of caching in this case? Having a microcache in /dev/shm should be plenty fast enough for just about any site. That's one of the things that we did on Gamespot.com, IIRC.

perusio was assigned Jan 19, 2012

Owner

perusio commented Jan 19, 2012

Yes. I've done it also before. But if you have multiple layers you can have staggered TTLs that puts you closer to the goal of almost zero load on PHP. I've used it before where there's two layer microcaching:

  1. A LB that has a central cache.
  2. Each backend has a distributed cache with a shorter TTL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment