[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: FastCGI daemon
- From: Bertrand Mansion <lua@...>
- Date: Fri, 23 Oct 2009 08:28:37 +0200
On Fri, Oct 23, 2009 at 7:28 AM, Stefan <email@example.com> wrote:
> Hello all, I was recently looking at different ways to switch our web
> application written in Lua from apache to nginx (we are currently using
> mod_wombat *in production* to earn a living).
I wouldn't use mod_wombat in production at the moment, it can be
vulnerable to DoS attack because the size of the request body that is
read is not limited and could fill the memory. It should use apreq2
instead of trying to do request parsing by itself. And there is no
easy way to limit and control how server resources are used (max
execution time, memory limit, ...).
For nginx, it is possible to use spawn-fcgid with Lua, wsapi and
fastcgi. I haven't tested this setup in production yet but it looks
> One night, I started with the FastCGI devkit threaded.c example, and after a
> bit'o'hackin started to see some promising results. It is multi-threaded and
> very lightweight, with Lua VM states that persist between HTTP requests.
> So I tossed it up on http://github.com/STPeters/luafcgid and now I have come
> to the point where I will be building the interface (API?) from Lua land
> back to the worker thread. I was going to just build a mod_wombat compatible
> one, but then thought I would ask here - just in case anyone else was
> interested in one day using this abomination.
The performance seems very good, especially compared to mod_wombat.
> WSAPI comes to mind as a potential target...
In my opinion, WSAPI would be the way to go. I think it is better if
you don't force the use of handler functions like in mod_wombat.