lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Sep 24, 2012 at 2:01 PM, Harley Laue <losinggeneration@gmail.com> wrote:
> On Mon, Sep 24, 2012 at 3:48 PM, Coda Highland <chighland@gmail.com> wrote:
>>
>> On Sep 24, 2012 1:17 PM, "Harley Laue" <losinggeneration@gmail.com> wrote:
>>>
>>> On Mon, Sep 24, 2012 at 2:24 PM, Petite Abeille
>>> <petite.abeille@gmail.com> wrote:
>>> >
>>> > On Sep 23, 2012, at 2:43 AM, g.lister <g.lister@nodeunit.com> wrote:
>>> >
>>> >> I was wondering what are people doing for Lua web development and if
>>> >> anyone is using nginx as the HTTP server and how is Lua setup in this case.
>>> >
>>> > While nginx is a fine piece of machinery, do you really need such a
>>> > tight integration and its added complexity?
>>> >
>>> > CGI is looked down at, but its simplicity and portability cannot be
>>> > beaten.
>>>
>>> IMO it's rightly looked down upon for well establish reasons (the
>>> overhead of spawning a new process on each request causes scaling
>>> issues.) That's why FCGI & SCGI came about to help with that
>>> bottleneck.
>>
>> There's more to it than just the spawn overhead. There's also the state
>> overhead. Each CGI process spawned has to re-query the relevant portions of
>> state from long-term storage, including state that is temporary but
>> longer-lived than a single request. A persistent process can maintain
>> relevant state in RAM, avoiding the need to repeatedly query for
>> rarely-changing data and offering a better way of dealing with session data.
>>
>> /s/ Adam
>
> Yes, I was merely giving a single example of where it can cause bottle
> necks. There are obvious others, but I didn't think I needed to give a
> complete list ;)
>

The re-query overhead is a bigger deal than the spawn overhead, in
light of the other comments that have been made in the thread. ;) I
mean, a really slim inetd-based server can do the job efficiently
enough, so there's gotta be more than that to make it a big deal.

/s/ Adam