Ask Bjørn Hansen ask at
Sun Nov 4 08:32:45 UTC 2007

On Oct 23, 2007, at 12:17, Brian Beuning wrote:

> One instance of memcached could handle our tiny 400 MB with no  
> problem.
> It can probably even handle the load of 100 processes hitting it.   
> But I am
> concerned if memcached went down then we would miss our fixed time  
> window.

Setup two clusters of caches, always write to both.   When you read,  
try one first and if it misses then try the other.   Maybe add some  
simple logic to detect if one of the clusters have a lot of misses and  
try the "good one" first in the future.

If you divide up each cluster in 5-10 instances each, then the failure  
of any one server should have typically no impact, but in the worst  
case then a small one (because only 10-20% of the data was there).    
Have the application re-fetch missing data (from both clusters) from  
the database and store it again in both clusters.

As you pointed out in the other mail, having the application "redo"  
the writes to the cache that lost the data seems like a messy path to  

A variation to consider would be to "cache" the data in MySQL with the  
ndb storage engine.

  - ask

-- -

More information about the memcached mailing list