From: Brian Candler Date: 2012-05-22T02:37:12+09:00 Subject: Re: Ruby through CGI and Rails 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. > 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. -- Posted via http://www.ruby-forum.com/.