client failure mode -- Cancel or Redistribute?
Tue, 12/04/2012 - 09:31
(Background): http://dustin.github.com/java-memcached-client/apidocs/net/spy/memcached...
It seems to me that if the cluster contains more than one node, Redistribute is strictly better. What I'm seeing is that if I set failure mode to Cancel and kill a node, then every operation to that node will fail until the server is failed over. But if I set failure mode to Redistribute, then the request says "oh that one didn't work, I'll try another".
Is there any reason not to use Redistribute for couchbase? How does conflict resolution work in this case?
I believe that the Couchbase Java SDK uses RETRY by default and I would recommend that you use that one. A key can only be set on a single node and trying to set it on a different server would result in an error and the key not being set. The default RETRY behavior will keep trying to send the key until the 2.5 second timeout is hit. If the keys location has changed because of a rebalance the client is also smart enough to figure out where the key moved to.