From: Shaun Lloyd Date: 2012-05-22T12:24:29+09:00 Subject: Re: Ruby through CGI and Rails On 22/05/12 03:37, Brian Candler wrote: > Shaun Lloyd wrote in post #1061455: >> I am trying to find information on why the cgi interface is obsolete and >> why everyone is using rails/rack etc. I actually really like rails but >> can't seem to find the details on why they don't simple run as cgi >> script. I have a shared cpanel managed domain and setting up rails apps >> is a piece of cake and in some ways the archecture of rails somehow >> makes ruby feel more like a application rather that connecting the dots >> with shtml. >> >> I understand the "cost" of forking process's server side, i also >> understand the security implications of having your own process! > The cost of starting a Rails app is huge - several seconds of startup > time. You really really don't want to do this from scratch on every > request. > It's a real huge. I did tests locally, cross country and cross continent. I love ruby and rails but honest ruby on rails has very serious performance issues. The community seems to be working on the problem with the standard mix of different solutions being thrown at the issue. I wish them all the best. Rails will only get faster, thats for sure. Execution time is not the only benchmark to be sure, but in web development it is critical if not the most critical issue. >> Does rails exec and sleep in memory but never die. Does each connected >> user "share" that process ? > Depends how you run it. The normal way is to have a pool of processes > each of which is waiting for a HTTP request. It accepts and processes > one HTTP request, sends the response, then goes back to waiting for > another request. > Any developers working specifically on execution time, optimizations etc would be great. Thanks very much for you help Brian.