# Faster rails server under XP

**URL:** <https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874>\
**Category:** Rails\
**Created:** [September 16, 2006, 4:31am UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874 "2006-09-16T04:31:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 4:31am UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/1 "2006-09-16T04:31:47Z")

</div>

I’m new to rails world, so I’ve use InstantRails to play with it.

Webrick is great in this respect, but looks like it allow only one  
“task” at a time.

I’ve tried to use apache, but it’s very-very slow compared to webrick.  
I do something wrong?

What is the recomended configuration under XP? I plan to test/use the  
application still under development with other friends from this  
“server”. What I need is a step-by-step tutorial, as I don’t know what  
I’m doing :-(, so should be easy to install.

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 4:43am UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/2 "2006-09-16T04:43:49Z")

</div>

rosoft2001 wrote:

> “server”. What I need is a step-by-step tutorial, as I don’t know what  
> I’m doing :-(, so should be easy to install.
> 
> >

Check out mongrel [http://mongrel.rubyforge.org/index.html](http://mongrel.rubyforge.org/index.html)  
It works on windows and is fast. For development you can run one  
instance of it but if you want to deploy to production then you will  
want to look into using mongrel\_cluster with some sort of other web  
server for static files like apache or lighttpd.

Matthew M.  
[blog.mattmargolis.net](http://blog.mattmargolis.net)

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 7:55am UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/3 "2006-09-16T07:55:58Z")

</div>

On 9/15/06, Matthew M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> instance of it but if you want to deploy to production then you will  
> want to look into using mongrel\_cluster with some sort of other web  
> server for static files like apache or lighttpd.

If you look inside the root Instant Rails directory, you’ll see that  
Mongrel  
is included (but not yet accessible through the Manager’s UI). The next  
release of Instant Rails (which should be out in a few weeks) drops SCGI  
and  
uses Mongrel, instead.

Curt

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 1:22pm UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/4 "2006-09-16T13:22:19Z")

</div>

rosoft2001 wrote:

> I’m new to rails world, so I’ve use InstantRails to play with it.
> 
> Webrick is great in this respect, but looks like it allow only one  
> “task” at a time.
> 
> I’ve tried to use apache, but it’s very-very slow compared to webrick.  
> I do something wrong?

It sounds as if Apache is calling your Rails application through CGI,  
which loads Ruby, Rails and your application on every request, rather  
than one of the faster options (SCGI, FastCGI, proxying to Mongrel…)  
which use long-running processes with your application loaded at process  
startup.

regards

Justin F.

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 5:12pm UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/5 "2006-09-16T17:12:40Z")

</div>

YES, this works!

I even start it as a service, so I don’t have the cmd windows open,  
with

mongrel\_rails\_service install -n myapp -r c:\my\path\to\myapp -p 4000  
-e production  
mongrel\_rails\_service start -N myapp

Thanks!

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 8:22pm UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/6 "2006-09-16T20:22:55Z")

</div>

Yes, it works, but not as I expected:

if I open 2 browsers, the second one wait until the first one finish  
the job, looks like it’s still 1 user at a time.

Any idea?

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 17, 2006, 2:05am UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/7 "2006-09-17T02:05:14Z")

</div>

rosoft2001 wrote:

> Yes, it works, but not as I expected:
> 
> if I open 2 browsers, the second one wait until the first one finish  
> the job, looks like it’s still 1 user at a time.

If you are using a single instance of Mongrel, it will only handle one  
request at a time. For production use, you would use multiple Mongrel  
instances, behind a server that distributes the HTTP requests to them.

regards

Justin F.

---

<div class="post-metadata">

**Author:** ![rosoft2001](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@rosoft2001](https://www.ruby-forum.com/u/rosoft2001)\
**Post date:** [September 16, 2006, 8:05am UTC](https://www.ruby-forum.com/t/faster-rails-server-under-xp/68874/8 "2006-09-16T08:05:59Z")

</div>

Curt H. wrote:

> ```
> > I've tried to use apache, but it's very-very slow compared to
> >
> 
> ```
> 
> Mongrel is included (but not yet accessible through the Manager’s UI).  
> The next release of Instant Rails (which should be out in a few weeks)  
> drops SCGI and uses Mongrel, instead.
> 
> Curt  
> and you can run from your application directory using something like  
> this:

InstantRails\rails\_app\my\_app\>ruby …\ruby\bin\mongrel\_rails start  
…and it will start Mongrel on Port 3000 on localhost.

Cheers  
Mohit.
