Skip to content

Instantly share code, notes, and snippets.

@sheldonshen
Forked from Integralist/Redis vs Memcache.md
Created August 11, 2017 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheldonshen/1b3116aa3f0789d5e208be81d2ca1bd0 to your computer and use it in GitHub Desktop.
Save sheldonshen/1b3116aa3f0789d5e208be81d2ca1bd0 to your computer and use it in GitHub Desktop.
Redis vs Memcache

When deciding between Memcached and Redis, here are a few questions to consider:

  • Is object caching your primary goal, for example to offload your database? If so, use Memcached.
  • Are you interested in as simple a caching model as possible? If so, use Memcached.
  • Are you planning on running large cache nodes, and require multithreaded performance with utilization of multiple cores? If so, use Memcached.
  • Do you want the ability to scale your cache horizontally as you grow? If so, use Memcached.
  • Does your app need to atomically increment or decrement counters? If so, use either Redis or Memcached.
  • Are you looking for more advanced data types, such as lists, hashes, and sets? If so, use Redis.
  • Does sorting and ranking datasets in memory help you, such as with leaderboards? If so, use Redis.
  • Are publish and subscribe (pub/sub) capabilities of use to your application? If so, use Redis.
  • Is persistence of your key store important? If so, use Redis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment