Clustering and rebalancing with Memcached
We are planning to use memcached bucket with clustering setup. The application first tries to GET a key and then, if not found, would perform store operation. Suppose, there are two servers participating in a cluster. Consider following scenario.
1. Assume, both servers are up
2. There is a cache item (key-1) which is stored in Server-1
3. Now, Server-1 goes down
4. That means, key-1 would be now stored on Server-2
5. After sometime, server-1 comes up.
6. Key-1 would be now stored on server-1
7. At this point, both servers would have Key-1 stored. Is that correct?
8. Server-1 goes down again.
9. Now, if one performs GET operation for Key-1 then would GET succeed (Server-2)?
In clustering, there occurs rebalance when any node goes up or down. As far as I understand, rebalancing means, a key MUST be unique (across all participants in a cluster - if not unique, then it should be removed after rebalancing) at any point, after rebalance occurs. Is that inline?
One more general question, does rebalance of cached items take place with *memcached* buckets?