Hello!
On Sun, Feb 10, 2013 at 9:11 AM, Vitaly Kosenko wrote:
> I have used lua-nginx many times for small projects and now I want to start
> new a big one. It should be large web application running at multicore
> servers. And I want to ask you a question as you know nginx and create
> lua-nginx.
> Nginx is event-driven program wich is not scale to many cores directly. So
> lua-nginx is as well single threaded (mainly), isn't it? May be it is not
> very good choice for multicore servers? Could you tell me you thought?
>
Nginx's multi-worker architecture is mainly for multi-core servers.
Basically when we have N CPU cores, we run approximately N Nginx
workers (and also set CPU affinity for the workers accordingly). Even
though each Nginx worker process is single-threaded, different Nginx
worker processes can run on different CPU cores, thus making full use
of almost all the CPU resources available.
When (blocking) disk I/O is involved, we may want to run a little more
than N workers.
It is a very common setting for many of our users to run Nginx or
OpenResty applications with multiple workers on 8-core, 24-core or
even 48-core servers in production.
BTW, I'm cc'ing the openresty-en mailing list:
http://groups.google.com/group/openresty-en You're strongly
recommended to join this list and send such general questions there :)
Best regards,
-agentzh