Why the multiple web servers?

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

Ah–okay then. Thanks!

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs