Skip Menu |

This queue is for tickets about the Cache-Memcached-Fast CPAN distribution.

Report information
The Basics
Id: 32203
Status: rejected
Worked: 5 min
Priority: 0/
Queue: Cache-Memcached-Fast

People
Owner: Nobody in particular
Requestors: drew [...] drewtaylor.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Allow rehashing for missing servers
We were implementing support for memcached at $work today, and wanted to use Cache::Memcached::Fast but didn't like that it would not rehash the keys to another server if the requested one is down. I'd like to request that we have the option to use max_failures OR rehash the key to another server. The standard perl client does it in a very simple way and based on my quick glance at the code I think would be possible to implement in ::Fast. I would love to have the extra speed of this module, but need the failover model of the pure-perl version. Thanks, Drew
From: KROKI [...] cpan.org
Срд. Янв. 09 11:12:12 2008, drew@drewtaylor.com писал: Show quoted text
> We were implementing support for memcached at $work today, and wanted > to use > Cache::Memcached::Fast but didn't like that it would not rehash the > keys to another server if the > requested one is down.
It's technically possible to implement rehashing the same way C::M does, however this will likely screw cluster consistency. Suppose you have several memcached servers and several C::M::F clients. When the client detects that the server is down it would rehash the keys to another server. The problem is that the client can't distinguish between "server down" and (temporal) "network down" cases. While some clients might fail to reach particular server, others may reach it alright, so when some clients will start to rehash, others will not, and the clients would no longer agree on what key goes where. I don't see the way to implement consistent rehashing without the consistent view on which servers are up and which are down, and to get such a view you'd have to design memcached server differently (make all servers aware of each other for instance, but implementing such distributed system is not a simple task). Instead of rehashing one may simply monitor the servers with some script, and either restart them, or automatically rewrite address list passed to C::M::F constructor.