# Mongrel, non-Rails serving and a hardware load balancer

**URL:** <https://www.ruby-forum.com/t/mongrel-non-rails-serving-and-a-hardware-load-balancer/86884>\
**Category:** Deployment\
**Created:** [February 26, 2007, 6:59pm UTC](https://www.ruby-forum.com/t/mongrel-non-rails-serving-and-a-hardware-load-balancer/86884 "2007-02-26T18:59:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [February 26, 2007, 6:59pm UTC](https://www.ruby-forum.com/t/mongrel-non-rails-serving-and-a-hardware-load-balancer/86884/1 "2007-02-26T18:59:35Z")

</div>

Hi again everyone!

OK making tons of progress learning here and getting pretty close to  
deployment and I need a some more guidance. I’ve been testing with  
Nginx as the proxy to my mongrel cluster but I also have a hardware load  
balancer. Now it seems to me that just using the load balancer to  
balance among all the mongrels in several clusters across several  
machines would be simple and work great. But if I want something other  
than Mongrel to serve up html, etc. or if I want to add in PHP support  
then I probably need to stick with something like Nginx or Apache as the  
proxy load balancer, correct?

Just to give a bit bigger picture, I have a couple of machines on which  
I’m going to be running a couple of VMs on with Xen so I’ll have at  
least 4 VMs and lots of mongrels too. Plus a development server with  
subversion and Capistrano to manage all the deployment.

As always, thanks again!

Raul

---

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [February 27, 2007, 12:17am UTC](https://www.ruby-forum.com/t/mongrel-non-rails-serving-and-a-hardware-load-balancer/86884/2 "2007-02-27T00:17:31Z")

</div>

On Feb 26, 9:57 am, Raul [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> OK making tons of progress learning here and getting pretty close to deployment and I need a some more guidance. I’ve been testing with Nginx as the proxy to my mongrel cluster but I also have a hardware load balancer. Now it seems to me that just using the load balancer to balance among all the mongrels in several clusters across several machines would be simple and work great. But if I want something other than Mongrel to serve up html, etc. or if I want to add in PHP support then I probably need to stick with something like Nginx or Apache as the proxy load balancer, correct?

Several issues here:

1. Can you bypass nginx with a hardware load balancer? Answer: yes

2. Is it as efficient? Not quite: nginx is _very_ efficient at serving  
static images.

3. How does this interact with non-Rails applications: Answer:  
depends!  
a) If you can balance on level-7 information (URL for instance)  
then it’s not a deal breaker  
b) If you can put the different technologies at different IP  
addresses, then it’s not a deal breaker  
c) If you want and/or need SSL and/or gzip compression, if your  
load balancer provides these functions, then it’s not a deal breaker.

#3 could go on and on.

> Just to give a bit bigger picture, I have a couple of machines on which I’m going to be running a couple of VMs on with Xen so I’ll have at least 4 VMs and lots of mongrels too. Plus a development server with subversion and Capistrano to manage all the deployment.

Congrats on your technology stack. You’re on a great path, IMHO. 🙂

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![raul](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@raul](https://www.ruby-forum.com/u/raul)\
**Post date:** [February 27, 2007, 1:21am UTC](https://www.ruby-forum.com/t/mongrel-non-rails-serving-and-a-hardware-load-balancer/86884/3 "2007-02-27T01:21:36Z")

</div>

Thanks for the response! OK I can see where you’re headed. I think I  
might  
explore using the hardware load balancer across all the VM’s and set up  
identical Nginx/Mongrels across them all. If I need to add PHP support  
I’ll  
add them across all of them as well. Basically just treat them all like  
a  
server farm I guess. So I don’t think it’ll be too bad having double  
load  
balancing, one at the hardware level and the next at the software level.

Thanks for the reply, any other views is greatly appreciated!

Raul

----- Original Message -----  
From: “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: “Deploying Rails” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Monday, February 26, 2007 3:16 PM  
Subject: [Rails-deploy] Re: Mongrel, non-Rails serving and a hardware  
load  
balancer
