[riak] put request

Rusty Klophaus rusty at basho.com
Tue Feb 16 09:54:12 EST 2010


Hi W,

You are right that all operations go through vnode_master, but this process
is simply a dispatcher, working in a fire-and-forget type way, so it is not
a bottleneck. Only a small fraction of the overall operation time is spent
in the master process, and the master is free to handle the next operation
as soon as it dispatches the current one.

You can see what I mean around line 43 of vnode_master.erl. The vnode_master
simply maps partition to a Pid (process id) of a vnode process by doing a
lookup in an in-memory table, and then dispatching the request to that Pid:

    Pid = get_vnode(Partition, State),
    gen_fsm:send_event(Pid, {put, FSM_pid, BKey, RObj, ReqID, FSMTime}),

Best,
Rusty

On Sat, Feb 13, 2010 at 9:59 AM, wde <wde at free.fr> wrote:

> Hello,
>
>
> If I have understood correctly, all put requests sent to a riak node, are
> handled by the "vnode_master",
> before to be routed to the vnode that handles the corresponding partition.
>
> Do you think that the "vnode_master" could be a bottleneck ? All requests
> to a riak node are serialized by the "vnode_master" FSM.
>
>
> thank you
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20100216/b2e33e25/attachment.html>


More information about the riak-users mailing list