FastCGI performance question

Hello,

I’m coming from a PHP, ASP and JSP environment and learning Rails.
I just purchased the “Agile Web D. 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

On 5/12/2005, at 7:40 AM, Frank R. 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 H.
[email protected]

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/justin-160-gehtland-is-back-with-numbers-to-back-it-up
. You might also be interested in switchtower:
Peak Obsession which you’ll want to use if
scaling is an issue.

Regards
Jan Pril.

On Sun, 4 Dec 2005, Frank R. wrote:

Hello,

I’m coming from a PHP, ASP and JSP environment and learning Rails. I just
purchased the “Agile Web D. 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

Thanks for the links.
I appreciate everybody’s help.

Frank
----- Original Message -----
From: “Jan P.” [email protected]
To: [email protected]
Sent: Sunday, December 04, 2005 1:55 PM
Subject: Re: [Rails] FastCGI performance question

Thanks you, I did not realize that.

Frank

----- Original Message -----
From: [email protected]
To: [email protected]
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
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


[email protected] 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

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

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.