Handling failovers (rewrite)
Ben Manes
ben_manes at yahoo.com
Wed Jul 4 06:11:57 UTC 2007
Sorry, another question!
In the Java client, I don't see the following scenario being taken care of:
0. Lets assume that we have one memcached server that is prone to failure. Lets call it bucket_1.
1. The remote cache is warmed before release, and we have some key/value pairs in bucket_1.
2. bucket_1 crashes, and on-demand our key_1 are remapped to bucket_2.
2.A. The first get() would return a null, indicating a miss.
2.B. We reload the data from the database and add it to bucket_2.
3. A user modifies some configuration data, and so we update our value for key_1 in bucket_2.
4. Some time later, we bring bucket_1 back online. It now has no data.
5. Our key_1 is requested, hits bucket_1, and we get a miss/reload. Now, bucket_1 has the new data and bucket_2 has stale data.
6. bucket_1 crashes yet again.
7. key_1 is requested, is remapped to bucket_2, and now gets stale data.
This is obviously a small edge case and it would be difficult for the client to know that it needs to expire the value in bucket_2. More than likely the stale data is benign, but I believe the scenario is valid.
Thanks!
Ben
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070703/e04371b2/attachment.html
More information about the memcached
mailing list