How to copy data using memcache
I am trying to find good resources for advanced data replication techniques on memcache servers. What I want to do is that if one of my servers in my pool is down, the next server in the line already has an information set.
I found "repcached", but since I am running a WIN32 test environment, I was unable to install it.
So what are our alternatives on how to replicate data between servers?
Thanks,
a source to share
I've never bothered about this myself (memcache just has to be a cache after all, even if every instance was an exact copy of every other instance, you still can't guarantee that the value will always exist once you add it: for example, it may be inferred due to LRU policy).
However, if I were to implement this as a feature, I would put it in the client, not as a patch for the server.
That is, instead of hashing the key to one server, hash it to 2 or 3 servers, and store the value for all of them. Then when you put the value back, try getting it from the first, if it's not there, try the second, etc.
This has the added benefit of not replicating every value: you can only replicate the ones you choose.
a source to share