Continuous HTTP POSTs to Riak

Mark Schmidt mschmidt at
Thu Mar 3 21:21:47 EST 2016

Hi Qiang,

Other more skilled folks can correct me if I am wrong, but I believe you can enforce strong consistency on your nodes:

If I recall, you will take a performance hit as all nodes must receive the data.


-          Mark Schmidt

From: riak-users [mailto:riak-users-bounces at] On Behalf Of Qiang Cao
Sent: Thursday, March 03, 2016 6:13 PM
To: Dave King <djking at>
Cc: riak-users <riak-users at>
Subject: Re: Continuous HTTP POSTs to Riak

Thanks, Dave! I'm aware of Riak's eventual consistency. I wonder how I can get Riak work in the way as I need. I'm in a situation where I expect the immediate GET reads the value I've just posted. And the GET request isn't sent out until the POST is done.


On Thu, Mar 3, 2016 at 6:53 PM, Dave King <djking at<mailto:djking at>> wrote:
You need to google 'Eventual consistency'.

- Peace

On Thu, Mar 3, 2016 at 4:23 PM, Qiang Cao <caoqiang.cs at<mailto:caoqiang.cs at>> wrote:
Hi All,

I use Riak as a KV store and send http requests to its REST API to update entries. Instead of using curl, I use Apache HttpClient to send requests.

One thing bothering me is that sometimes I find the entry isn't properly updated after an HTTP POST/PUT. For example, if I do an HTTP GET on the same key immediately after an HTTP POST, the chance is good that I get a stale value. This happens when I continuously POST to a multi-node Riak, and some of the posts target the same key.

Also, I find I don't have this issue if I use a single-node Riak. So I think something wasn't correct with my multi-node Riak cluster (I set "allow_mult" to false).  Any thoughts?

Thanks in advance!


riak-users mailing list
riak-users at<mailto:riak-users at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list