lua-users home
lua-l archive

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



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