Ben Cantrick (mackys) wrote,
Ben Cantrick
mackys

Memcached internals.


At its core, Memcached is a high-performance, distributed caching system. It is application neutral, and is currently used on many large scale web sites such as Facebook (2TB of cache, circa Q1 2008), LiveJournal, Mixi, Hi5, etc. However, it is also an extremely simple piece of software: all of the logic is client-side, there is no security model, failover, backup mechanisms, or persistence (albeit the last one is in the roadmap). But that hasn't stopped the developers from deploying it in all kinds of environments, and here are a few best practices suggested by Brian:

1. Don't think row-level (database) caching, think complex objects
2. Don't run memcached on your database server, give your database all the memory it can get
3. Don't obsess about TCP latency - localhost TCP/IP is optimized down to an in-memory copy
4. Think multi-get - run things in parallel whenever you can
5. Not all memcached client libraries are made equal, do some research on yours. (Hint, use Brians.)


http://www.igvita.com/2008/04/22/mysql-conf-memcached-internals/
Tags: reddit
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment