Handling failovers (rewrite)
ben_manes at yahoo.com
Wed Jul 4 04:08:29 UTC 2007
Actually, minor correction. I meant to state that there is a 1/M chance that all N keys would map to the same server, if my understanding of how the buckets are chosen is correct.
----- Original Message ----
From: Ben Manes <ben_manes at yahoo.com>
To: memcached at lists.danga.com
Sent: Tuesday, July 3, 2007 9:03:43 PM
Subject: Handling failovers (rewrite)
I'm curious as to the recommended solution for recovering from a
failed memcached node. I've read other threads posing this question,
but responses haven't included implemented solutions or how large
build-outs manage this situation. For example, see:
I'm using the standard Java client which, like most clients, supports
auto-failover support. I don't quite understand how this works since
my understanding is that the server (bucket) is chosen by hashing the
keys and modding by the server list. It also doesn't seem like
dynamically updating the server list is supported, which other threads
have touched on. Could someone explain the built-in failover support
and how robust it is?
Disregarding the built-in mechanism, I see two obvious solutions I could layer on top of the client.
#1: Use a backup pool. If a request returns a miss, then request from the backup. If it hits, then the toggle the ordering.
#2: Use a pseudo, non-guaranteed stripping like a approach where
every incoming key is transformed into N keys. Those keys could be
requested in single or multi-get fashion. One would assume that there
is a 1/N chance that all of the keys would map to the same failed
I'd like to know how others have handled this issue. When a server comes back up, do you attempt to rewarm it?
P.S. Again, sorry about the failed message earlier. Firefox seems to send, Opera does not.
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the memcached