[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Web development with Lua
- From: Tim Mensch <tim-lua-l@...>
- Date: Sun, 16 Oct 2011 18:59:58 -0600
On 10/16/2011 6:38 PM, Luciano de Souza wrote:
> What is the simplest way to run a Lua script in Apache producing web
Does it have to be Apache? Or would you rather support 10x-100x or more
users on the same hardware?
Because there's a great package that includes Nginx+Lua called OpenResty
. They claim you can serve 30k Lua-based pages/second on decent
hardware, and I'm getting 1800/second on a cheap VPS with no
optimization (and my benchmark may have been limited by the computer I
was requesting pages from or the benchmarking software).
The reason for the speed is that it's deeply integrated into Nginx:
Queries from Lua can yield so that the event loop doesn't block, and so
you get epoll speed from an app server driven by Lua code. The API is
really straightforward too -- good for someone who doesn't want to do
anything more complicated.