Using Cache memcache,
1, the hash algorithm can be used by the client to decide which Memcache server to route to, the client does not care about which Memcache server the data is stored, completely isolate the client and the service side; Select to specify memcache server very quickly;
Premise: Maintain a fixed number of memcache servers, always correctly select the Memcache server, get the correct cache data.
In fact, with the development of the business, the number of Memcache servers is always increasing, if it is simply a hash%memcache number to select the specified cache server, each additional memcache server will result in a higher cache failure rate.
IMPORTANT: The core point of distributed cache design: When designing a distributed caching system, we need to equalize the distribution of the key, and after adding the cache server, the cache is migrated to a minimum.
In order to solve this problem, there are two kinds of scenarios: consistent[consistency hash] and Modula
Consistent hash algorithm Ketama approach is: Select the specific machine node is not only rely on the need to cache the data key hash itself, and the machine node itself is also a hash operation.
For a description of the consistency hash algorithm Ketama, refer to: http://blog.csdn.net/kongqz/article/details/6695417
http://blog.csdn.net/sparkliang/article/details/5279393
MySQL High availability