Restarting the MemcacheD Cluster

timeless time at digg.com
Sat Apr 15 01:12:50 UTC 2006


Suppose somehow we've decided there's "bad data" in the MemcacheD 
cluster, and don't really know where it is. It seems the safest course 
of action would be to flush_all across the cluster.

Here's what I came up with for doing it:

for i in 1 2 3 4 5 ; do echo "flush_all" | netcat -q 1 memcached.$i 
11211 ; sleep 15 ; done

Does this seem reasonable to everyone? Is there a more elegent (or 
proper) way of doing this? (Doing a rolling restart of the memcached 
daemons across my cluster appears to be the WRONG way to do it, and 
seems it would cause cache corruption).

-- 
timeless


More information about the memcached mailing list