lua-users home
lua-l archive

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

Fabio Mascarenhas wrote:

CGILua right now is as fast as CGI on FastCGI, because it is creating one
state (using rings) per request, for isolation. Creating Lua states is
pretty cheap, but reading and recompiling all CGILua libraries from disk in
this new state is a good bottleneck for simple scripts. The latest versions
of Kepler have a better isolation model for WSAPI/Orbit applications that is
much faster, I'll shoehorn CGILua in this model sometime (needs a major
refactoring of CGILua).

As we are already thousands of lines into a series of Apache request handlers written in Lua (aka the mod_wombat way), I wish you the best of luck bringing up the speed of CGILua. Although the core problem isn't the speed of CGILua as much as the speed of FastCGI.

When you start really pushing against the upper edge, a native Apache request handler starts to shine. This is simply because by the time the request has gotten to the mod_fcgi module and it is starting to send it through the named pipe to the FastCGI handler, the request has already gotten to the native module.

But writing big ones in C is daunting at best - and squashing bugs can be a great lesson in patience. The combination of raw APR + Lua is a scripting speed demon...

I see Kepler as being a very good fit for websites/forums/wiki - while mod_wombat seems a great path for gateways/applications, especially where speed is paramount. What we need in our gateway are thousands of requests per second, with a sub-second maximum response time.

Have we gotten off topic yet?

Back OT (somewhat) - someone should maintain a FreeBSD 'port' of Kepler (LuaRocks?). You really need a port/package in the tree if you want us old overworked UNIX salts to adopt a new server component.

If anyone wants to give it a go, here is the guide:

They even have decent support for Lua-based ports:

Fell free to bug me for advice or to help test a new Lua-related port. I don't have much spare time, but I do have access to alot of different hardware running different versions of FreeBSD ;)