Retrying requests to Riak
grourk at dropcam.com
Thu Apr 7 21:47:17 EDT 2011
I have a simple three node cluster that I have been using for testing and benchmarking Riak. Lately I've been simulating various failure scenarios -- like a node going down, disk going bad, etc.
My application talks to Riak through an haproxy instance running locally on each application server. It's configured to round-robin over the nodes in the cluster for both HTTP and PBC interfaces, and uses the HTTP /ping health check. I assume this is a rather typical setup.
I'm only using the HTTP interface right now... When there's a failure and a node returns a 5XX error, I'd like to have my application retry the request on a different node. I could of course build this retry logic into my application, but what I'm wondering is if there's another way that people are typically doing this. Is there a way to configure haproxy to do this? Do any of the Riak client libraries have this logic built-in?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users