couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vlad GURDIGA <>
Subject Re: inner mechanics question
Date Mon, 16 Nov 2009 12:18:53 GMT
On Mon, Nov 16, 2009 at 1:45 PM, Adam Kocoloski <> wrote:
> On Nov 16, 2009, at 6:40 AM, Vlad GURDIGA wrote:
>> Hello!
>> Again, I'm not sure whether it's a couchdb-dev@ or couchdb-user@ question.
>> I wonder how _shows, _lists, _updates (and maybe others?) couch-side
>> code is executed. Is there a single couchjs loaded on couch start and
>> it is fed all the functions that are called thought URLs or there is a
>> separate couchjs launched for every function?
>> Just want to understand what's going on with my code...
>> Thank you!
> Hi Vlad, the reality is in between those two cases.  CouchDB keeps a pool of couchjs
processes running.

Thanks a lot for the quick answer, Adam.

This sounds like Apache's StartServers* right? Is there a way to
configure the pool size?


> When one of these processes finishes executing a task it does not terminate, but rather
returns to an idle state and waits for the next command from Couch.  When a _show/_list/_update
call comes in, CouchDB grabs an idle couchjs, or spawns one if necessary.  It loads the code
that it wants executed and sends in the input data, then waits for a response.  Best,
> Adam

View raw message