True HA for RiakClient

Dietrich Featherston d at
Sat Mar 3 14:57:25 EST 2012

The haproxy approach tends to work well so long as haproxy it is located on
the machine from which the riak client is establishing connections to the
riak cluster. This way the client always talks over localhost and haproxy
is unlikely to be a failure point. So in your service tier, each machine
running a particular service requiring access to riak would also require a
running haproxy. I believe haproxy does a reasonable job of evicting downed
riak nodes but it must be configured to know the cluster membership ahead
of time (by way of chef for example).

We know that writes can be sent to any node in a riak cluster. That node
must, however, act as a coordinator for the write and make sure the data
arrives at the physical nodes with the partitions into which that key
falls. Some have posited the existence of a "fat client" which participates
as a member of the cluster in some capacity. This way the client can make
an informed decision about where to send a write thus reducing the
coordination overhead of the write arriving at a random node. This could be
important for applications with write volume sufficiently high that the
level of cross talk generated by random-writes (or reads for that matter)
becomes a problem. Unclear how widely available general solutions to this
problem have become, but I'd be curious to see how others have approached


On Sat, Mar 3, 2012 at 10:23 AM, Michael Clemmons
<glassresistor at>wrote:

> Phil,
> Its a pretty well known issue.  If you don't mind an older version of the
> riak client there is a folk on github that does support this
> Your other option is to manage it in your app or subclass the transport
> object.
> Some people use haproxy. I'm not a fan of this approach in production,
> since the load balancer is now the point of failure.
> On Sat, Mar 3, 2012 at 10:08 AM, Philip <flips01 at> wrote:
>> Hi,
>> I've just created my first 3 node riak cluster and must admit that I'm
>> stunned! However, it seems like the RiakClient is missing a really
>> important functionality for HA software. AFAIK you can only specify a
>> single server. I want to host a large riak cluster and a frontend
>> cluster separately. Using a single server for connecting would be a
>> huge single point of failure.
>> Am I missing something?
>> It would be nice if it would be possible to specify multiple servers
>> and the clients automatically chooses a random server that's available
>> from this list.
>> Best Regards
>> Philip
>> _______________________________________________
>> riak-users mailing list
>> riak-users at
> --
> -Michael
> _______________________________________________
> riak-users mailing list
> riak-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list