At LeaseWeb we developed the LswMemcacheBundle. This is not because we do not like Redis. Maybe Redis serves a different purpose, since it has support for data structures, but is single threaded on the other hand. Having data structures could lead to better (more efficient) cache usage, while being single threaded does make a difference on the maximum amount of concurrent get and set operations (see benchmark). So without choosing for either Redis or Memcache we want to tell you about SncRedisBundle for Symfony.
- This is an awesome set of slides about Redis
- Redis has very good documentation
- It even has a manifesto
- The Symfony2 bundle for redis is really good
- If you do high traffic sites be careful not to run into open file limit issues
The biggest differences between Redis and Memcache we found:
- Redis has support for data structures
- Redis has support for persistent storage
- Redis has more features (in general)
- php-redis and memcached are both C based clients, but php-redis is not yet in the Ubuntu repository and predis might be slower.
- Memcache is multi-threaded and gets higher IOPS on a multi core server
If you run a high traffic PHP site, consider running Redis and/or Memcache and share your thoughts with us.