RAID & memcached

Tue Feb 7 15:25:54 UTC 2006

> > A simple RAID layer over memcached would be fine.
> > read-from-one/write-to-all is easy to implement, bot not very
> > efficient & does not scale well.
> Easy to implement? For example: how do you want to handle 
> situation when
> the node is resurrected and data are not synchonized (all - server was
> shotdown or partially - just disconnected network for some 
> time)? How do
> you want to synchronize them or how do you event recognize if they are
> up-to-date or not?
> I thing it is quite far from easy task.

I should have written "looks easy" ;-) I should also have added "for non mission-critical apps"

- Handling new servers/rebooted servers is easy (but in an inefficient manner) : check nodes one after the other until someone has the key (if nobody has, is is a new one)

- As for partially down nodes with stale data, I was thinking of storing (within memcache) a map of nodes with their state.
When a write fails, the node is marked as invalid.
A separate process monitors nodes and flushes the cache before marking them as valid when they go back up.

IMHO, a "simple RAID mecanism" would have to trust the data not to be stale, but (as a memcache beginner) I don't think I would have too many staleness problems with such a map of nodes (as long as I do not have too many problems while writing the data).

If someone has a real RAID mecanism, I'm willing to get the code ;-)


More information about the memcached mailing list