开发者

memcache loadbalance/failover plan

开发者 https://www.devze.com 2022-12-14 21:49 出处:网络
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 loadba

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消