On 12/09/2011 11:53 AM, John Loehrer wrote:
I am currently evaluating riak. I'd like to be able to do periodic
snapshots of /var/lib/riak using LVM without stopping the node.
According to a response on this ML you should be able to copy the
data directory for eleveldb backend.

http://comments.gmane.org/gmane.comp.db.riak.user/5202


If I cycle through each node and do `riak stop` before taking a
snapshot everything works fine. But if I don't shut down the node
before copying, I run into problems. Since I access the http
interface of the cluster through an haproxy load-balancer, once the
node turns off it is taken out of the pool almost immediately. But
for a millisecond or two before haproxy detects the node is down
there might be some bad responses. I can live with it and build
better retries into my client, but would rather avoid it if I can.

Haproxy has a standby system you can use to remove a node from rotation politely, allowing existing requests to finish. You can remove them from haproxy directly at the command line (or using http-check disable-on-404, but that doesn't really make sense for riak)

echo "disable server <backend>/<node>" | socat stdio /etc/haproxy/haproxysock

... perform maintenance ...

echo "enable server <backend>/<node>" | socat stdio /etc/haproxy/haproxysock

--Kyle

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to