How Riak Handle Request?
fdushin at basho.com
Mon Apr 17 22:43:55 EDT 2017
What do you mean by 'process'?
If you mean operating system process, then, No. A Riak instance runs in a single OS process. There is a Riak instance per "node" in the cluster, where a "node" is a machine, container, etc. Probably what the OMG guys used to call a "capsule" (cute) There are typically many nodes in a Riak cluster; hence multiple OS processes, but in general it only makes sense to run each process on a separate node or machine, because things break.
If you mean a lightweight Erlang process, then yes, there is an Erlang process per connection. From that point on, it gets ... complicated. There are process corresponding to coordinating finite state machines, processes (plural) corresponding to vnodes, and there is a long list of processes that run support for all things between. But all of these Erlang processes (or "actors") run in a single operating system process, the Erlang virtual machine, or abstract machine, if you learned how to computer before Java.
Does that help?
> On Apr 17, 2017, at 9:19 PM, Jing Liu <jingliu.cs at gmail.com> wrote:
> I'm specifically concerned about connection reading, data sending,
> data encoding and decoding. Is that done by a single process, a
> fixed-size process pool or does Riak spawns a new process for every
> incoming request/connection?
> Thanks very much !
> On Mon, Apr 17, 2017 at 12:36 PM, Christopher Meiklejohn
> <christopher.meiklejohn at gmail.com> wrote:
>> On Sat, Apr 15, 2017 at 2:16 PM, Jing Liu <jingliu.cs at gmail.com> wrote:
>>> Hi, I'm learning Riak. I'm wondering that if this is the case that on
>>> each physical node, a single process is reading the connection,
>>> decoding the buffer, spawning a new process to process the request and
>>> then be able to handle next request from client?
>> Hi Jing,
>> Depending on what you're looking it, it might be handled differently.
>> Typically, a process pool is used to handle incoming requests, but
>> processing of the request itself is handled by several processes that
>> operate concurrently.
>> What specific operation are you referring to?
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users