From: David Heinemeier Hansson Date: 2004-11-20T23:44:02+09:00 Subject: Re: mission critical Ruby? > Developing in CGI mode using the default pure Ruby mysql driver will > feel very sluggish. Don't let that fool you into believing that's how > the production application will perform. Robert hit it spot on with all of these comments, but I'd just like to follow up with a small story about a Rails training/consulting session I had in Vancouver, Canada with Combustion Labs not too long ago. We had been using straight CGI all week to get started on development and everyone were getting used to the fact that reloading was a little slow (about 1 request per second). This was indeed cause for a bit disgruntlement among the developers as they were used to PHP where reloading in development and production was equally fast. So at the end of the week, I thought it was about time we tried out how it would perform in a production environment. We went straight to FastCGI (which is the recommended production environment for Rails, especially in scenarios with multiple apps per server). The performance increase totally silenced the team. We went from 1.16 requests per second to 104 requests per second! Two orders of magnitude. Mind you, this was on a simple page with just a few SQL calls. But still. Rails is _plenty_ fast. Ruby does a fantastic job managing OO-heavy systems where PHP just becomes slower and slower. Comparing the performance of a hello world page in PHP with a equivalent in Ruby (on Rails or not) is meaningless. PHP will likely be faster, but no system does "hello world" and shuts up. The differences appear once you have a "real" system with plenty of objects getting thrown around (which then again makes it hard to compare). Oh, and 50K transactions is one every two seconds (on a even split). You could almost do that on CGI. And you could certainly do it on everything from mod_ruby to FastCGI to WEBrick (which cached classes turned on). So now that you've asserted that every platform out there should be able to handle your processing needs, you should probably look at other factors. Like, how productive is the environment? I think you'll find that Java might not be what you want there (he said, trying to phrase it as PC as possible). -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain