Handling failovers (rewrite)
dustin at spy.net
Wed Jul 4 04:35:37 UTC 2007
On Jul 3, 2007, at 21:03 , Ben Manes wrote:
> 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?
There are two commonly employed strategies:
1) Since the server is chosen by computing a hash of the key
modulus the number of servers, you must maintain a consistent
ordering of servers on each client's list, so you can just walk the
list when a server fails.
2) Using a yet-to-be-completely-standardized consistent hashing
Either way, it's up to the client, so as long as you're not trying
to read and write data built using different clients, it really
doesn't matter which strategy your client employs as long as you've
proven it works for you.
Consistent hashing is conceptually a little more complicated, but
causes less stress on your data source when you're growing or
shrinking your clusters.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the memcached