On Jun 23, 8:19 pm, Pau Freixes <[email protected]> wrote:
> This change can be problematic because now the new continium has a more
> points for server A and server B , and probably keys that after this change
> was assigned in server A now can be assigned  in server B. And viceversa !
>
> Without weight algoritm works fine.

You are right, that the algorithm is somehow broken :) but you are
missing a point here that makes things even worse:
 1) Imagine you have cache servers A, B and C
 2) C goes down
 3) keys are remapped to A and B
 4) C comes up
and here comes the mess :)
 * since you have assigned some keys (k1, k2) from C to A and B, A and
B might now have the new versions of k1 and k2. Imagine the cache on C
is still there (it was probably a network or firewall issue), now C is
serving the old keys k1 and k2 ;)
 * I have not read the source you are referring to, but if it does
suff like you describe, namely remap keys from A to B and vice versa,
the mess is bigger. When C went down, you have remapped k3 from A to
B, so B might now have a newer version of k3. When C comes up, you
remap again k3 to A, so A will still serve the old version of k3.

Messy messy, most of the clients are broken in this way: they remap
keys upon server down and don't care that you might serve old stuff
after server up + remap again.

If you need consistency, don't use memcached at all or fix the problem
yourself ;) basically memcached stores key/value pairs on SINGLE
server, it doesn't care about the world outside and this is a big
problem, since it does not allow consistency over several instances.

Momchil

Reply via email to