So far I’ve tested (on windows 2003 server)
Lighttpd + SCGI, Lighttpd + Mongrel and Apache + SCGI and they all
match in terms of performance. I was using JMeter with 50 threads.
However I found that Lighttpd tend to crash under heavy load ( > 30
threads = 35% crash), no matter if I used Mongrel or SCGI, it’s not
exactly a crash actually but more like an infinite loop somehow, the
application just get stuck at 100% of the CPU, still respond to
request but naturally it’s slow as ever.
In all 3 setup I use Mongrel/SCGI only to serve Rails contents, all
Lighttpd. I also dont use caching because my app cannot benefit from
it due to it’s functionality (it’s editing a live database and users
need to have access to the latest data all the time).
One thing that I don’t understand though, when I do a test, the Rails
log tells me it renders the pages in 0.3 to 0.8 seconds, however the
test system gives me response time in excess of 5 seconds sometimes
under heavy load. How come there is such a massive difference between
what Rails says it took to render the page and the time it actually
takes to get the page from a test command?
I’m gonna try to run on Linux and see if it helps, however I need to
connect to a SQL Server DB so this is going to be fun too. I might
loose my head on this one.
Question for Zed: Given that Mongrel and SCGI give me similar result
from my test, which one is best to use for production? I sense that
SCGI seems more mature/stable but since you putting all your effort in
Mongrel now it may not be long before I’m wrong. What would you
recommend for the time being?