Anybody using SCGI in production?


#1

Or does anybody prefer fastcgi/fcgi? I’m using webrick for development,
but plan on using scgi
when I switch to production (because it appears to be an update to
fastcgi, and I couldn’t get
fastcgi working anyhow).

thanks
csn


Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com


#2

I’m working with FastCGI for the time being, but I too plan to move to
SCGI when I find a couple minutes in which to do so. Also, TextDrive’s
RailsBase will be all SCGI, it’s definitely going to get a lot of
production use there. Whatever works for you, go for it, but SCGI does
seem preferrable to FastCGI. Seems simpler to set up, too.

Jacob


#3

On 11/20/05, CSN removed_email_address@domain.invalid wrote:

Or does anybody prefer fastcgi/fcgi?

I’m now using SCGI for all my production sites. It’s simple to
configure and I haven’t had any reliability issues. Most of the sites
run on lighttpd, though one runs on Apache with cgi2scgi.


#4

I’m using both. In one case (Textdrive) FCGI was already set up, so
that was easy. In another it wasn’t, so SCGI proved far easier to deal
with.

SCGI has been great.


Chris B.

http://hypsometry.com/ : website edification
http://uvlist.org/ : free classifieds for the Upper Valley


#5

I’d like to hear a back-poll on this…
each of you : Windows or linux? Which version/distribution?
Thanks!


#6

On 11/22/05, Peter F. removed_email_address@domain.invalid wrote:

I’d like to hear a back-poll on this…
each of you : Windows or linux? Which version/distribution?

Uh, none of the above. :wink:

Textdrive runs FreeBSD. The other app is served from OS X Server. In
both cases Apache’s receiving the request and proxying it to lighttpd.


Chris B.

http://hypsometry.com/ : website edification
http://uvlist.org/ : free classifieds for the Upper Valley


#7

I run SCGI on Windows 2000 Server + Apache2. Runs like a dream. Its fast
in
development mode and even faster in production.


#8

On 11/21/05, Peter F. removed_email_address@domain.invalid wrote:

I’d like to hear a back-poll on this…
each of you : Windows or linux? Which version/distribution?

OpenBSD for the lighttpd sites. The Apache site is some version of
Linux running in a VPS.


#9

HI Jin,
How do you run SCGI ? Do you run it as a service ? Where did you get
your
binaries… I think I’m having trouble with binary version or something.


#10

— Chris B. removed_email_address@domain.invalid wrote:

In both cases Apache’s receiving the request and
proxying it to lighttpd.

What do you guesstimate the performance difference to be, versus using
only Lighttpd? I’m thinking
of trying Lighttpd, but will probably have to keep Apache around.

thanks
csn


Yahoo! FareChase: Search multiple travel sites in one click.


#11

Yes, I run SCGI as a service.

All you need to do is adopt the instiki instructions, located here:
http://www.instiki.org/show/Running+as+a+Windows+Service

For reference, here are my registry keys:

AppDirectory = (path to your web app, not the public directory but the
root
of the rails app)
Application = c:\ruby\bin\ruby.exe
c:\path_to_your_webapp\script\scgi_service

Everything else I got from zedshaw’s website,
http://www.zedshaw.com/projects/scgi_rails/index.html
if you are looking for a built mod_scgi.so file, check out Curt H.’
build
here: http://www.zedshaw.com/projects/scgi_rails/win32.html

The other essential part is to hook it up to Apache2, here is the
relevant
part of my httpd.conf:

#Ruby/RAILS
LoadModule scgi_module modules/mod_scgi.so

<VirtualHost *:80>
AddDefaultCharset utf-8
ServerAdmin removed_email_address@domain.invalid
DocumentRoot “C:/path_to_your_webapp/public”
ServerName www.blah.com http://www.blah.com
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html

handle all requests throug SCGI

SCGIMount / 127.0.0.1:9999 http://127.0.0.1:9999

matches locations with a dot following at least one more characters,

that
is, things like *,html, *.css, *.js, which should be delivered directly
from
the filesystem
<LocationMatch …+$>

don’t handle those with SCGI

SCGIHandler Off

<Directory “C:/path_to_your_webapp/public”>
Options +FollowSymLinks
Order allow,deny
allow from all

Hope that helps,

Jin