native erlang client on non-Riak node?

Michael Radford mrad at blorf.com
Wed Apr 4 14:40:01 EDT 2012


In case anyone else is wondering, the answer is no, the native client
isn't fully usable from a non-Riak node.

I started a hidden node and connected to one of my Riak nodes using
riak:client_connect. The returned client is able to successfully
execute Client:get(Bucket, Key) (and probably other simple things like
put/delete), but it fails on mapred with a {modfun, ...} input.

The problem is that the native client tries to run the input function
on the local node, rather than the node the client points to, which of
course won't work unless the local node is participating in the Riak
cluster.

Mike

On Tue, Apr 3, 2012 at 9:43 AM, Michael Radford <mrad at blorf.com> wrote:
> Is it OK to use Riak's native erlang client from an erlang node that's
> connected to a Riak cluster via normal erlang distribution
> (net_adm:ping etc.), but isn't participating in the Riak cluster?  I'm
> wondering if e.g. Riak makes any assumptions about nodes listed in
> nodes(), or the nodes of processes running client code, that would
> break if a node isn't running Riak.
>
> I'm trying to figure out a fallback strategy in case I can't resolve
> performance issues I'm seeing with the protocol buffers client (see
> other thread about slow searches).  The scariest option would be to
> run my application on the same nodes as Riak, which seems like it
> would complicate operations too much.  Or if
> connected-but-not-participating nodes aren't a good idea, maybe my
> application nodes could each start a slave node with -hidden, which
> would then connect to Riak and act as a proxy?
>
> Mike




More information about the riak-users mailing list