RE: Apache or lighttp for Ror/2003server?

You can use Lighttpd on Windows with SCGI but not FCGI (as far as I

In our tests, Apache+FCGI is comparable to Lighttpd + SCGI or Mongrel.
Bottom line… Windows performance isn’t great but it’s faster than PHP
through IIS with CGI and close to PHP+FastCGI on IIS. (Make sure your
dispacher shebang line points to rubyw.exe!)

If you can, I’d recommend trying for Lighttpd on Linux. I get about 4
times faster performance there with the same application. We’re going
to attempt to use Linux even though we’re a Windows shop, beecause of
the performance boost as well as the ability to do some nice stuff with
Switchtower (by which I mean Capistrano.) That and I’m tired of broken
rake tasks and other odd issues.

You’ll want to run your own tests though to see how it will perform for

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
images,javascripts, stylesheets are server statically by Apache or
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?