Forum: Ruby on Rails FastCGI performance question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
998baab37c607466125c1235c1ad7006?d=identicon&s=25 Frank Rocco (frocco)
on 2005-12-04 19:43
(Received via mailing list)
Hello,

I'm coming from a PHP, ASP and JSP environment and learning Rails.
I just purchased the "Agile Web Development with Rails" and find it
excellent.

Here's my question:
I always thought that CGI apps were slow and memory hogs as compared to
servlets that have one copy in memory.

Is this true when hosting rails apps on Windows?
I hope not as I am really impressed with Rails web development.

Thanks

Frank
01d7a451018ac15518f425078ef00c40?d=identicon&s=25 sitharus-rails (Guest)
on 2005-12-04 19:47
(Received via mailing list)
On 5/12/2005, at 7:40 AM, Frank Rocco wrote:

> Here's my question:
> I always thought that CGI apps were slow and memory hogs as
> compared to servlets that have one copy in memory.
>
> Is this true when hosting rails apps on Windows?

Rails uses FastCGI which behaves similar to a servlet - it loads one
copy and keeps it loaded, and therefore is quite fast.

--
Phillip Hutchings
phillip.hutchings@sitharus.com
E48d29dc8fedb2878fa518d41cc63d88?d=identicon&s=25 JanPrill (Guest)
on 2005-12-04 19:59
(Received via mailing list)
Hi, Frank,

coming from java-webapp-development myself I'm petty impressed until
now, what rails has achieved performance wise. Here is a pointer to some
research done by Justin Gehtland:
http://weblog.rubyonrails.com/articles/2005/04/04/...
. You might also be interested in switchtower:
http://manuals.rubyonrails.com/read/book/17 which you'll want to use if
scaling is an issue.

Regards
Jan Pril.
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 ara.t.howard (Guest)
on 2005-12-04 20:03
(Received via mailing list)
On Sun, 4 Dec 2005, Frank Rocco wrote:

> Hello,
>
> I'm coming from a PHP, ASP and JSP environment and learning Rails.  I just
> purchased the "Agile Web Development with Rails" and find it excellent.
>
> Here's my question: I always thought that CGI apps were slow and memory hogs
> as compared to servlets that have one copy in memory.

a fastcgi process __is__ a servlet.  rails runs in two modes cgi __and__
fastcgi.  cgi is slow and for development only, fastcgi is a servlet
type
model which is several orders of magnitude faster that plain cgi.

google fastcgi.

cheers.

-a
998baab37c607466125c1235c1ad7006?d=identicon&s=25 Frank Rocco (frocco)
on 2005-12-04 20:07
(Received via mailing list)
Thanks you, I did not realize that.

Frank

----- Original Message -----
From: <ara.t.howard@noaa.gov>
To: <rails@lists.rubyonrails.org>
Sent: Sunday, December 04, 2005 2:02 PM
Subject: Re: [Rails] FastCGI performance question


>> as compared to servlets that have one copy in memory.
> --
> ===============================================================================
> | ara [dot] t [dot] howard [at] noaa [dot] gov
> | all happiness comes from the desire for others to be happy.  all misery
> | comes from the desire for oneself to be happy.
> | -- bodhicaryavatara
> ===============================================================================
>


--------------------------------------------------------------------------------


> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--------------------------------------------------------------------------------
998baab37c607466125c1235c1ad7006?d=identicon&s=25 Frank Rocco (frocco)
on 2005-12-05 02:45
(Received via mailing list)
Thanks for the links.
I appreciate everybody's help.

Frank
----- Original Message -----
From: "Jan Prill" <JanPrill@blauton.de>
To: <rails@lists.rubyonrails.org>
Sent: Sunday, December 04, 2005 1:55 PM
Subject: Re: [Rails] FastCGI performance question
E555e7c34196967444a47a96395a23ab?d=identicon&s=25 skaes (Guest)
on 2005-12-06 09:42
(Received via mailing list)
ara.t.howard@noaa.gov wrote:

>> as compared to servlets that have one copy in memory.
>
>
> a fastcgi process __is__ a servlet.  rails runs in two modes cgi __and__
> fastcgi.  cgi is slow and for development only, fastcgi is a servlet type
> model which is several orders of magnitude faster that plain cgi.

I *strongly* suggest not to use CGI at all, not even for development
mode. For several reasons:

1. The execution model of CGI is very different from FCGI.
2. Developing in an environment that doesn't resemble your production
environment as closely as possible is bound to hide potential production
environment problems.
3. It will slow down your development process considerably.

-- stefan

http://railsexpress.de/blog
2d52c69580d87a6e570637a48ee82b09?d=identicon&s=25 Chris Hartjes (Guest)
on 2005-12-06 22:11
I'm curious about this...does lighttpd running through script/server use
FCGI or not?

skaes wrote:

>
> I *strongly* suggest not to use CGI at all, not even for development
> mode. For several reasons:
>
> 1. The execution model of CGI is very different from FCGI.
> 2. Developing in an environment that doesn't resemble your production
> environment as closely as possible is bound to hide potential production
> environment problems.
> 3. It will slow down your development process considerably.
>
> -- stefan
>
> http://railsexpress.de/blog
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 nicholas.stuart (Guest)
on 2005-12-07 03:28
(Received via mailing list)
lighttpd does use fcgi, but as it was stated earlier, it runs
completly differently then regular cgi. Webrick uses its very own
method I'm assuming, becuse its all in rails.
This topic is locked and can not be replied to.