# Best web server for running a Rails site?

**URL:** <https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526>\
**Category:** Rails\
**Created:** [May 7, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526 "2007-05-07T15:58:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/1 "2007-05-07T15:58:09Z")

</div>

I heard about Mongrel and Webrick, but they are also interpreted right?  
isn’t that going to be slow? I mean we know currently that Ruby  
Interpreter itself is slow as turtle. And our web applications are in  
Ruby already. So now we have rails, our application and the server being  
executed at one time. That would be a lot of resource and execution time  
per request.

Is there an alternative like using Apache or other Known web servers?

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/2 "2007-05-07T16:48:24Z")

</div>

Go to the mongrel web site and read their documentation on deployment  
options. You can use mongrel by itself, or with a front end web  
server like Apache. It also goes into some details on the advantages  
and disadvantages of each deployment option so you can make an  
informed decision on what best fits your needs.

I would recommend doing your research before posting your own  
speculations on what you feel are limitations in these technologies.  
Some very smart people have put these tools together, and they are  
very clear about what options you have. You just need to take to time  
to look into them.

On May 7, 9:58 am, Mike H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/3 "2007-05-07T17:15:27Z")

</div>

You don’t use Mongrel by itself. You use a mongrel cluster with a  
load balancer, like Apache. That takes the load of any static files  
off of Ruby. Then there’s your app. The execution of an application  
request dwarfs any work that Mongrel is doing. If 99% of a request is  
application processing then it doesn’t matter if you switch from  
Mongrel to an infinitely fast (magic) app server–you’ll still only  
get 1% improvement.

There’s a lot of Rails performance hysteria out there right now, but  
it’s important to remember that Ruby is only slow relative to other  
languages, and not terribly slow at that. You don’t see people  
running out and building web frameworks in C++ just because “Java is  
slow”.

On May 7, 7:58 am, Mike H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 6:58pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/4 "2007-05-07T18:58:36Z")

</div>

On 07 May 2007, at 17:15, dasil003 wrote:

> There’s a lot of Rails performance hysteria out there right now, but  
> it’s important to remember that Ruby is only slow relative to other  
> languages, and not terribly slow at that.

The benchmarks I’ve seen put Ruby at the slowest language out there  
that anyone’s actually using. That said, slow is often relative to  
what you’re doing, how you code it, and what other facilities you  
use. Rails has a lot of mechanisms (caching, etc.) to help speed up  
your _app_.

-faisal

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/5 "2007-05-07T18:44:35Z")

</div>

Exactly, what is slow? My productivity has increased tenfold and the  
performance is top-notch. Serving static files through Apache and  
balancing the rest to a mongrel cluster is just a dream come true.

On 07 May 2007, at 17:15, dasil003 wrote:

> There’s a lot of Rails performance hysteria out there right now, but  
> it’s important to remember that Ruby is only slow relative to other  
> languages, and not terribly slow at that. You don’t see people  
> running out and building web frameworks in C++ just because “Java is  
> slow”.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 8:34pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/6 "2007-05-07T20:34:51Z")

</div>

Another issue, that hasn’t yet been raised, is that if your Ruby code  
is spending 90%+ of it’s time waiting on you SQL queries to return,  
then the performance difference between Ruby and any other language  
becomes irrelevant. In my experience this is true a very large  
percentage of the time. Most of your performance tweaking will be  
database related anyway.

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [May 7, 2007, 7:02pm UTC](https://www.ruby-forum.com/t/best-web-server-for-running-a-rails-site/103526/7 "2007-05-07T19:02:37Z")

</div>

On May 7, 2007, at 12:58 PM, Faisal N Jawdat wrote:

> The benchmarks I’ve seen put Ruby at the slowest language out there  
> that anyone’s actually using. That said, slow is often relative to  
> what you’re doing, how you code it, and what other facilities you  
> use. Rails has a lot of mechanisms (caching, etc.) to help speed  
> up your _app_.

_also_

The Ruby performance issue is around execution speed. Threads won’t  
particularly help with that, except insofar as they reduce the memory  
footprint of the application server. It isn’t clear how much they’ll  
help there, since a lot of the infrastructure will need to be  
replicated anyway.

-faisal
