lua-users home
lua-l archive

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


Jacob Jay wrote:

On 23 Oct 2009, at 11:03 PM, Stefan wrote:

I was under the impression that wsapi-fcgi did NOT persist the scripts between invocations, unless you run each script as it's own fastcgi server.

Fabio has pitched in a concise answer on this point. I'd add that if needed you could probably do high-performance shared data in your solution using lindas amongst the threads, whereas with separate fastcgi server processes I'm resorting to a solution something akin to a memcached for Lua tables. Of course if you just use MySQL only the persistence for the connection matters. (I was getting ~2500rps with some MySQL queries and app logic.)


Running a couple dozen (at least) extra processes that MUST stay up at all times doesn't appeal to sysadmin in me.

My main criteria are:

1) lightweight
2) fast
3) reliable, even under extremely heavy loads
4) controllable and intelligent resource utilization
4) easy administration for critical installations

Same here :) But I do think separate fcgi server processes are more resilient and flexible, if not quite as manageable as a single multi-threaded process. With balancing across the multiple processes (as noted in my response to Bertrand, the number of processes would probably only equal the number of cores), if one of them dies (or is restarted...) the webserver/proxy will ignore it until it comes back, and continue distributing requests amongst those that are still up.


I *was* planning on running at least two instances of the fastcgi daemon... I suppose the main difference left would be the threading and the tighter control on resource usage.

How does wsapi-fcgi handle file modifications? Is it doing a file stat each request?