Best practice Ruby on Rails on Windows configuration

Hi,

I have read many articles on the net today about configuring Ruby on
Rails
on a Windows server. But there doesn’t seem to a one solution for all on
how
to configure a new Ruby on Rails server. So I can use some advise with
this.

I am using a Windows 2003 server and don’t get many request a day. But
most
of the request are quite heavy. The main focus is on optimizing the
requests, instead of improving the amount of page requests.

Any advise is welcome,

Benjamin

On Nov 14, 2007 2:03 PM, Benjamin van Eck [email protected]
wrote:

Hi,

I have read many articles on the net today about configuring Ruby on Rails
on a Windows server. But there doesn’t seem to a one solution for all on how
to configure a new Ruby on Rails server. So I can use some advise with this.
I am using a Windows 2003 server and don’t get many request a day. But most
of the request are quite heavy. The main focus is on optimizing the
requests, instead of improving the amount of page requests.

There are many ways to respond your inquiry, and the options depends
on your “server” or business requirements.

I'll like to point that Mongrel isn't Rails. Mongrel is a webserver that provides a easy hook to allow Rails run under the hood.

There are other web frameworks like Merb, Nitro and IOWA that uses
Mongrel, and each one has its pros and cons.

  • If you’re forced to IIS (Internet Information Server) it seems
    latest IIS7 support FastCGI, so using libfcgi and ruby-fcgi works out
    of the box

Hmn… I shouldn’t mention that since we are in the Mongrel list :wink:

If you aren’t forced to use IIS, then Mongrel will be a good
alternative for this.

You mention low request per day, but heavy requests. Is there a way
you can improve and reduce the “penalty” each request faces?
Background process that parse and perform the heavy/intensive tasks?

I can confirm this, but creating a “cluster” with swiftiply [1] on
Windows could be achieved, but had no time to investigate it further.

If you don’t plan to serve static content (huge files downloads) or
file uploads, then Mongrel is a good solution.

For development and testing (staging) you can use mongrel +
mongrel_service to have a single instance and see if the solution fits
your needs.

HTH,

[1] http://swiftiply.swiftcore.org/

Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

i don’t really understand what you want to know.

“main focus is on optimizing the requests, instead of improving
the amount of page requests”

that sounds more like code optimization in your rails app, when your
app doesn’t perform well enough you have to tweak your code or
probably add more ram, faster disk and or a faster cpu. the deployment
or server configuration won’t change that.

but if you want to know what software to use:

as an example i currently have a few windows installations with the
following setup

apache 2.2.4 with mod_sspi authenticatiing users via NTLM against an
Active Directory
and proxy balancing the requests to
6-12 mongrel_services
and a single DRb for Ferret searches running as a service for all
mongrels
using a MS SQL 2005 DB on a dedicated server

the apache is configured to use memcache and bypass the proxy on all
requests towards /images /stylesheets and /javascripts to not bother
the mongrels for stuff that doesn’t need any server processing

if any performance issues arise i can easily scale by adding more
mongrels on other machines.

cheers
ralf

Am 14.11.2007 um 18:03 schrieb Benjamin van Eck:

  • If you’re forced to IIS (Internet Information Server) it
    seems latest IIS7 support FastCGI, so using libfcgi and
    ruby-fcgi works out of the box

I’ve tried out the FastCGI ISAPI module for IIS6 recently and still
experienced no joy getting it to play nicely with rails. Do you happen
to have any pointers to notes from anyone who’s gotten IIS and rails to
play well using FastCGI?

Myself, I run three mongrel instances behind a pen load balancer and use
the ISAPI Rewrite module to proxy it. It works great, but getting it up
and running on a new machine takes a bit of time and effort, and no
win32 McAdmin is ever going to be able to support it. Thus, I’m inclined
to try to migrate to the IIS+FastCGI configuration as soon as it’s
viable.

  • donald

On Nov 14, 2007 10:19 AM, Luis L. [email protected] wrote:

I can confirm this, but creating a “cluster” with swiftiply [1] on
Windows could be achieved, but had no time to investigate it further.

I need to figure out the compiler toolchain issues so that I can build
a windows gem with the extensions, or I need to provide a pure ruby
implementation for the pieces being handled by extensions. I’ll
probably end up providing pure ruby functionality in any event, but I
would really like to figure out how to get windows gems built with the
extensions.

Then it would be practical to use it for Mongrel clusters on Win*.

Kirk H.

On Nov 14, 2007 3:38 PM, Ball, Donald A Jr (Library)
[email protected] wrote:

  • If you’re forced to IIS (Internet Information Server) it
    seems latest IIS7 support FastCGI, so using libfcgi and
    ruby-fcgi works out of the box

I’ve tried out the FastCGI ISAPI module for IIS6 recently and still
experienced no joy getting it to play nicely with rails. Do you happen
to have any pointers to notes from anyone who’s gotten IIS and rails to
play well using FastCGI?

I was talking about IIS 7 … clearly stated the version number :slight_smile:

There was a lot of improvement of FastCGI in IIS7

More information:

http://wiki.rubyonrails.org/rails/pages/HowToConfigureIIS7
http://forums.iis.net/t/1146576.aspx

Myself, I run three mongrel instances behind a pen load balancer and use
the ISAPI Rewrite module to proxy it. It works great, but getting it up
and running on a new machine takes a bit of time and effort, and no
win32 McAdmin is ever going to be able to support it. Thus, I’m inclined
to try to migrate to the IIS+FastCGI configuration as soon as it’s
viable.

I know your pain, the bootstrap process is a real pain, even for windows
:stuck_out_tongue:


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

On Nov 14, 2007 3:58 PM, Kirk H. [email protected] wrote:

extensions.

Then it would be practical to use it for Mongrel clusters on Win*.

Kirk, contact me off the list and we can talk about that :wink:


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

On 11/14/07, Luis L. [email protected] wrote:

play well using FastCGI?

I was talking about IIS 7 … clearly stated the version number :slight_smile:

There was a lot of improvement of FastCGI in IIS7

IIS7 means running on Windows Vista or Server 2008 (which is still a
beta
AFAIK). You can’t get IIS 7 on Windows Server 2003.

On Nov 15, 2007 10:19 AM, Andrei M. [email protected] wrote:

I was talking about IIS 7 … clearly stated the version number :slight_smile:

There was a lot of improvement of FastCGI in IIS7

IIS7 means running on Windows Vista or Server 2008 (which is still a beta
AFAIK). You can’t get IIS 7 on Windows Server 2003.

Thank you, I wasn’t aware that beta is still running, neither the
system requirements (you know, I don’t use IIS at all).

Anyway, that’s one solution for FastCGI, there are other paths :wink:


Andrei M.
http://andreimaxim.ro


Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi