# Production deployment

**URL:** <https://www.ruby-forum.com/t/production-deployment/96484>\
**Category:** Rails\
**Created:** [June 29, 2006, 12:00am UTC](https://www.ruby-forum.com/t/production-deployment/96484 "2006-06-29T00:00:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@thila](https://www.ruby-forum.com/u/thila)\
**Post date:** [June 29, 2006, 12:00am UTC](https://www.ruby-forum.com/t/production-deployment/96484/1 "2006-06-29T00:00:50Z")

</div>

Gang-  
We are getting ready to launch our ROR application; the last item  
remaining is the deployment platform. For testing, we had used Apache +  
MOD\_FastCGI. I am not that impressed with it; sometimes it has strange  
effects. For example, when we start the application, for about 5 minutes  
or so, the app is very unstable and it gets better over time.

My questions is … should I go with (1) mod\_fastCGI or try (2) Lighttpd  
OR (3)apache mod\_proxy with mongrel. What are the pros and cons of these  
three deployment platform. Also, are there any other solution. I would  
love to hear from those who have their app in production.

/thanks  
thila.

---

<div class="post-metadata">

**Author:** ![thila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@thila](https://www.ruby-forum.com/u/thila)\
**Post date:** [June 29, 2006, 12:14am UTC](https://www.ruby-forum.com/t/production-deployment/96484/2 "2006-06-29T00:14:42Z")

</div>

On Jun 28, 2006, at 3:00 PM, thila thila wrote:

> Lighttpd  
> OR (3)apache mod\_proxy with mongrel. What are the pros and cons of  
> these  
> three deployment platform. Also, are there any other solution. I would  
> love to hear from those who have their app in production.
> 
> /thanks  
> thila.

Thila-

```
A few questions...

```

1. How much traffic and on what kind of hardware are you running?

2. Do you need ssl?

Cheers-  
-Ezra

---

<div class="post-metadata">

**Author:** ![thila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@thila](https://www.ruby-forum.com/u/thila)\
**Post date:** [June 29, 2006, 1:24am UTC](https://www.ruby-forum.com/t/production-deployment/96484/3 "2006-06-29T01:24:01Z")

</div>

On Thu, Jun 29, 2006 at 12:00:50AM +0200, thila thila wrote:

> My questions is … should I go with (1) mod\_fastCGI or try (2) Lighttpd  
> OR (3)apache mod\_proxy with mongrel. What are the pros and cons of these  
> three deployment platform. Also, are there any other solution. I would  
> love to hear from those who have their app in production.

If you’re trying to set up a scalable solution, use something as a web  
server, and something else as the app server (even if they’re on the  
same machine).

Apache mod\_proxy is a fine choice for the web server. If you’re familiar  
with lighttpd or any other fast server, you can use that instead. You  
can proxy onto another port number on locathost, or to another machine.

I’ve had luck with lighttpd/fastcgi as an app server; many people like  
mongrel. If you’re not going to be using specific features of the app  
server, choose whatever is easiest to set up at the moment 🙂 Setting  
your app server so it can only accept requests from the web server is a  
good step too, for security reasons.

-jim

---

<div class="post-metadata">

**Author:** ![thila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@thila](https://www.ruby-forum.com/u/thila)\
**Post date:** [June 29, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/production-deployment/96484/4 "2006-06-29T18:59:17Z")

</div>

I have actually been wondering the apache 2.2 w/ mod\_proxy\_balancer &  
mongrel for a cluster setup, but does this mean it won’t handle  
forwarding SSL requests in a single server or cluster web app env?

So basically using something like pound would be the best solution to  
forward SSL in a cluster? Thanks.

Ezra Z. wrote:

pound/pen/haproxy as the front

> end depending on whether or not you need ssl. Once lighty’s mod\_proxy  
> is fixed I will most likely recommend that as a front end instead of  
> apache2.2. For now apache2.2/mod\_proxy\_balancer/mongrel\_cluster is  
> one of the best ways to go.
> 
> Cheers-  
> -Ezra

---

<div class="post-metadata">

**Author:** ![thila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@thila](https://www.ruby-forum.com/u/thila)\
**Post date:** [June 29, 2006, 7:23pm UTC](https://www.ruby-forum.com/t/production-deployment/96484/5 "2006-06-29T19:23:38Z")

</div>

On Jun 29, 2006, at 12:59 PM, Marston A. wrote:

> I have actually been wondering the apache 2.2 w/ mod\_proxy\_balancer &  
> mongrel for a cluster setup, but does this mean it won’t handle  
> forwarding SSL requests in a single server or cluster web app env?
> 
> So basically using something like pound would be the best solution to  
> forward SSL in a cluster? Thanks.

Just add this to your Apache ssl conf:

RequestHeader set X-Forwarded-Proto “https”

You can also dig around in the railsmachine gem source for more  
Apache-\>Mongrel cluster tricks.

Regards,  
Bradley Taylor

---

<div class="post-metadata">

**Author:** ![thila](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@thila](https://www.ruby-forum.com/u/thila)\
**Post date:** [June 29, 2006, 8:00pm UTC](https://www.ruby-forum.com/t/production-deployment/96484/6 "2006-06-29T20:00:30Z")

</div>

On 6/28/06, thila thila [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> My questions is … should I go with (1) mod\_fastCGI or try (2) Lighttpd  
> OR (3)apache mod\_proxy with mongrel. What are the pros and cons of these  
> three deployment platform. Also, are there any other solution. I would  
> love to hear from those who have their app in production.

I’m currently using a setup similar to the following. It’s good  
reading, even if you don’t plan to use Apache 2.2 + proxy + mongrel  
cluster.

[http://tinyurl.com/hdwf4](http://tinyurl.com/hdwf4)

– James
