I wanna know if there is any loadbalance/failover plan for memcache. I'm using JAVA client. I knew some client implementions can开发者_JAVA技巧 talk with multi memcache servers, but how about loadbalance?
Memcached itself does not although it does use a hashing algorithm to distribute keys across a cluster. However, some clients do provide failover mechanisms but that depends on your language AND client.
For instance, in the perl cpan libraries Cache::Memcached does provide failover in a cluster if one server goes down while Cache::Memcached::Fast does not.
You should double check your client libraries. PHP and some other libraries provide consistant hashing. This way if one server fails, the keys are redirected to another.
精彩评论