Failover strategy for memcached

failovermemcached

I am trying to understand how memcached works (newbie) to anticipate the sudden failure of a node using/offering memcached. I have a couple of questions to ask:

i) If a have a system with 3 nodes offering 1 GB each, do I need to install the memcached server service on each node or only on one node?

iia) If memcached server is installed on each server, should/can clients establish a connection to each node to anticipate for failing nodes?

iib) If a memcached server should only be installed on one node, then does it make sense to install two instances of 1.5 GB shared memory memcached servers on separate nodes to anticipate for the failure of one memcached server?

iii) What is the role namespaces exactly? Should they be used as part of a failover strategy?

Thanks.

Best Answer

  • 1.You must install memcached on each server. Take a look at repcached.
  • 2.a Put it behind a load balancer like: HAProxy, Pacemaker, ...