views:

319

answers:

2

I wanna know if there is any loadbalance/failover plan for memcache. I'm using JAVA client. I knew some client implementions can talk with multi memcache servers, but how about loadbalance?

A: 

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.

Rob Van Dam
A: 

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.

Daniel