Alan and Brian discussed the slab allocator, protocol, internal hash table, LRU (least recently used), and threading. The slab allocator is the name of memcached memory allocator. The LRU keeps track of the age of each slab. memcached uses a consistent hash algorithm for the slabs to be located quickly and supports dynamically adding new servers to the pool. One thing that is cool about the hash table is it is pluggable and you can choose a different algorithm to meet your needs.
memcached’s protocol is ascii based, similar to HTTP, however they are in the process of finishing up a binary protocol which should have less overhead and better performance.
The current architecture is threaded and scales OK on machines with 4-8 cores, but when 16-32 core servers come out, memcached will not scale as well. Future versions will be improving threading support and scale better on larger machines.
Brian talked about the libmemcached a bit which is a memcached client library written in C. The API looks pretty easy as it uses very similar concepts and naming as other higher level client APIs.
One thing that Brian said that stood out is we should move away from synchronous actions and towards asynchronous event. It was a very interesting talk and Brian definitely knows what he’s talking about.