# Why the multiple web servers?

**URL:** <https://www.ruby-forum.com/t/why-the-multiple-web-servers/135679>\
**Category:** Rails\
**Created:** [April 24, 2008, 5:31am UTC](https://www.ruby-forum.com/t/why-the-multiple-web-servers/135679 "2008-04-24T05:31:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [April 24, 2008, 5:31am UTC](https://www.ruby-forum.com/t/why-the-multiple-web-servers/135679/1 "2008-04-24T05:31:56Z")

</div>

I’m trying to understand how the multiple web servers interact w/one  
another in a rails deployment. If I’ve got thin or mongrel or what  
have you serving my app, what’s apache doing for me? What can I read  
to clear this up for me?

Thanks!

-Roy

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [April 25, 2008, 2:24am UTC](https://www.ruby-forum.com/t/why-the-multiple-web-servers/135679/2 "2008-04-25T02:24:19Z")

</div>

Ah–okay then. Thanks!

---

<div class="post-metadata">

**Author:** ![rpardee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Post date:** [April 24, 2008, 5:42am UTC](https://www.ruby-forum.com/t/why-the-multiple-web-servers/135679/3 "2008-04-24T05:42:27Z")

</div>

On Wed, 2008-04-23 at 20:31 -0700, Roy P. wrote:

> I’m trying to understand how the multiple web servers interact w/one  
> another in a rails deployment. If I’ve got thin or mongrel or what  
> have you serving my app, what’s apache doing for me? What can I read  
> to clear this up for me?

* * *

typically rails is a single threaded process.

You can have multiple ‘mongrels’ to serve more than 1 thread at the same  
time in case one thread is tied up.

Apache then is used as a proxy to the available mongrels, plus apache  
can/will cache fixed assets (javascripts/stylesheets) and generally make  
things fast.

Lastly, you tend to run rails in user space and users don’t/shouldn’t  
have access to port 80 (http) and thus the proxy gets the stuff from  
high numbered user space tcp ports.

Craig
