Looking for docs on how server failure (and recovery) is handled

Asked by TimBunce on 2013-02-11

I can't seem to find documentation that describes exactly what happens when a server goes down, and how best to handle its graceful recovery.

The documentation for the behaviours seems to assume a certain level of knowledge that I don't have, or at least I'm not sure about. It's a reference manual. I'm looking for a guide.

My question is similar to http://stackoverflow.com/questions/10029432/libmemcached-fail-over-of-a-clusters-node
except that a) I'd like more background information, and b) there's no discussion of handling the recovery of a node.

Question information

English Edit question
libmemcached Edit question
No assignee Edit question
Last query:
Last reply:
TimBunce (tim-bunce) said : #1

As an example, the venerable and original Cache::Memcached module (https://metacpan.org/source/DORMANDO/Cache-Memcached-1.30/lib/Cache/Memcached.pm) seems to recalculate the 'buck2sock' mapping (by $socket_cache_generation++;) whenever a socket is marked dead by _dead_sock() being called.

But some of calls to _dead_sock, specifically those from connection setup, also provide a duration ($dead_for) during which the host should be regarded as dead.

So a single communications error on an established socket doesn't remove a server, but does cause a connection drop and reconnect. If that reconnect fails then the server is removed from the buck2sock calculation for a period.

This seems reasonable and is self-repairing. Sadly the docs don't discuss this behaviour at all.

I'm rather surprised I can't find this kind of discussion in the libmemcached docs. Am I missing something?

MacDeveloper (cbisegni) said : #2

Hi the stackoverflow questions was made by me. I have also wrote to libmemcached main developer but i haven't had any answere. Have you found something of usable?

Can you help with this problem?

Provide an answer of your own, or ask TimBunce for more information if necessary.

To post a message you must log in.