[Instantrails-users] RwRoR on IR?

David Morton mortonda at dgrmm.net
Thu Jan 12 14:44:59 EST 2006

Hash: SHA1

Bill Walton wrote:
> What the heck is SCGI and how does it fit into the Rails architecture?

SCGI is a (better, IMHO) replacement for fastcgi.  It loads the rails
environment and application into a always running process, which speeds up the
response time over plain CGI.

Essentially, a SCGI Mount point is set up on /dispatch.fcgi and then any
requests that need to be handled by rails gets mapped onto that point via
mod_rewrite.  Unlike Fastcgi, the file, "dispatch.fcgi" is not actually run, but
rather the request is proxied to the running SCGI process.

The Webrick server which is used in most tutorials is a simple webserver written
in Ruby, which also has the rails environment already loaded.  Howver, it isn't
really designed for production level hosting, which is where the
Apache/[fastcgi/scgi/mod_ruby] part comes in.

The best reason for doing this IMHO is that SCGI can run as a different user
than apache, which makes for much better security.  And with Instant rails, it
is all pretty much set up for you, so you can do development in it.  OTOH,
several editors, like radrails, need to start up the webrick server so they can
do debugging.  In that case, simply stop the apache process, and ignore the scgi

- --
David Morton
Maia Mailguard                        - http://www.maiamailguard.com
Morton Software Design and Consulting - http://www.dgrmm.net
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Instantrails-users mailing list