[riak] put request

classic Classic list List threaded Threaded
3 messages Options
wde
Reply | Threaded
Open this post in threaded view
|

[riak] put request

wde
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
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: [riak] put request

Rusty Klophaus
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 <[hidden email]> 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
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
wde
Reply | Threaded
Open this post in threaded view
|

Re: Re: [riak] put request

wde
In reply to this post by wde
Hi rusty,

Thank you for the clarification.



 

>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 <[hidden email]> 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
>> [hidden email]
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com