KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
We are deploying memcached for our application, and I would like to make it as resistant as I can. We plan to use the newer memcacheD extension. One thing that I haven not fully figured out is, what happens if one of the servers dies. At the very least it seems like the memcached client just 'gives up' on that server, and doesn't store anything in it. This behavior I'm fine with. We can deal with a bunch of cache-misses. However, it would be nice that after one of the servers is deemed 'failed' the subsequent sets and gets get re-distributed to the servers that are left over. Since this does not seem to happen automatically; I guess the only way to approach this issue is to have an external system do health-checks on memcached systems, and update the list of servers appropriately. But if there's a list of 10 servers, and lets say, the 5th dies.. even with the Ketama-hashing it would seem that this would trigger a big redistribution of keys (this is just based on common sense). So ideally, I would simply like the PHP extension to figure out a server is down, mark it for down for a specified amount of time (10 minutes) and during those 10 minutes fall back to other servers (nicely distributed) for sets and gets. How do other people solve this? Edit : clarifying my libketama point. Say we have 10 servers: 1,2,3,4,5,6,7,8,9,10 One of them dies. Libketama will then provide a very high likelyhood that the hits to the missing server get equally distributed to the remaining servers: 1,2,3,4,inactive,6,7,8,9,10 BUT: if we provide and manage this list manually, this is not the case: 1,2,3,4,6,7,8,9,10 // There are now 9 servers! 6 will get now 5's previous keys, 7 will get 6's. 8 will get 7's, 9 will get 8's and
Tags (comma-separated)
Save Edits
Cancel