4. Memcached的历史及现状 什么是Memcached Memory Cache Daemon memcached is a server that caches Name Value Pairs (NVPs) in memory Memcached能做什么 任何元素:HTML片段、二进制对象、数据结果集 极大地提高数据的获取效率 Memcached不能做什么 Memcached不是持久化的存储 Memcached本身不支持分布式和高可用
23. memcache的分布式算法 Libketama Take your list of servers (eg: 1.2.3.4:11211, 5.6.7.8:11211, 9.8.7.6:11211) Hash each server string to several (100-200) unsigned ints Conceptually, these numbers are placed on a circle called the continuum. (imagine a clock face that goes from 0 to 2^32) Each number links to the server it was hashed from, so servers appear at several points on the continuum, by each of the numbers they hashed to. To map a key->server, hash your key to a single unsigned int, and find the next biggest number on the continuum. The server linked to that number is the correct server for that key. If you hash your key to a value near 2^32 and there are no points on the continuum greater than your hash, return the first server in the continuum.
25. Memcached的扩展 memcached Storage Engine for MySQL Apache memcached Session repcached memcachefs Memcachedb Flared Tokyo Tyrant
26. 参考资料 Using Memcached – How to scale your website easily http://timyang.net/tag/cache/ http://www.mysqlperformanceblog.com/2006/08/09/cache-performance-comparison/ http://www.last.fm/user/RJ/journal/2007/04/10/rz_libketama_-_a_consistent_hashing_algo_for_memcache_clients 从Memcached分布式应用看一致性哈希散列函数的选择 Memcache的mutex设计模式 Memcached数据被踢(evictions>0)现象分析 Cache Performance Comparison