On Mon, Dec 24, 2012 at 3:59 AM, Yoga <[email protected]> wrote:
> Hi,
>
> Assume I have two memcached nodes (*node A, B*) at the beginning, and
> when I added a new *node C*, portion of keys are remapped and thanks to
> consistent hashing, only some of them.
>
> Let assume a value with key "*foo*" originally at server A, is now being
> to mapped to server C.
>
> When I finally removed node C, the key should be mapped to node A again,
> but at that time, node A only contain stale data.
>
> So, is flushing the data only way to solve this issue?
>
>
> Maybe, but then, how do you know that the node insert and removal have
taken place? If you have strict requirements, quite likely your
application's integration with memcached will have a synchronization
protocol to manage them.
What's the definition of stale in your environment? If the objects have a
timeout [ say of 10 minutes ] and the insert and removal of node C is
greater than the timeout [ 11 minutes ] all get( "foo" ) calls would fail
on node A and, I assume, your application would re-create foo and
set("foo", "data") in A.