?

Log in

No account? Create an account
Memcached internals. - Adventures in Engineering — LiveJournal
The wanderings of a modern ronin.

Ben Cantrick
  Date: 2008-04-22 15:55
  Subject:   Memcached internals.
Public
  Tags:  reddit

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/
Post A Comment | 1 Comment | | Link






Triggur
  User: triggur
  Date: 2008-04-22 23:12 (UTC)
  Subject:   (no subject)
Nice. <3 memcached.

I wrote a database class generator for java that does a bunch of types of basic queries by itself and writes all the getters/setters and makes the classes transparently memcache-aware if you ask for that.
Reply | Thread | Link



browse
May 2015