# Apache2 / MySQL / Mongrel on separate machines

**URL:** <https://www.ruby-forum.com/t/apache2-mysql-mongrel-on-separate-machines/85259>\
**Category:** Rails\
**Created:** [February 12, 2007, 1:53am UTC](https://www.ruby-forum.com/t/apache2-mysql-mongrel-on-separate-machines/85259 "2007-02-12T01:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![northband](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ecae2f/32.png) [@northband](https://www.ruby-forum.com/u/northband)\
**Post date:** [February 12, 2007, 1:53am UTC](https://www.ruby-forum.com/t/apache2-mysql-mongrel-on-separate-machines/85259/1 "2007-02-12T01:53:06Z")

</div>

Hi all, I have read and re-read the tutorials on mongrel clusters and  
have a question. Most, if not all, deal with having everything run on  
one box, locally. I would like to add more redundancy by having  
several boxes. Would I do this by editing the apache config as such:

\<Proxy balancer://mongrel\_cluster\>  
BalanceMember [http://192.168.1.102:8000](http://192.168.1.102:8000)  
BalanceMember [http://192.168.1.103:8000](http://192.168.1.103:8000)  
BalanceMember [http://192.168.1.104:8000](http://192.168.1.104:8000)

My ideal setup would be to have Apache2 run a box fronting all my  
mongrels, have a cluster of 2-3 mongrel servers running several  
instances of mongrel on each, and lastly have MySQL plugged into the  
ring. My aim would be to be able to add mongrel machines as I need to  
or replace if one goes out on me.

Doing this, what kind of conflict may I be facing? Also will  
capastrano work well with this also?

Any help appreciated!!! btw, I am using Ubuntu for this.

-Northband

---

<div class="post-metadata">

**Author:** ![northband](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ecae2f/32.png) [@northband](https://www.ruby-forum.com/u/northband)\
**Post date:** [February 12, 2007, 5:51am UTC](https://www.ruby-forum.com/t/apache2-mysql-mongrel-on-separate-machines/85259/2 "2007-02-12T05:51:17Z")

</div>

On 2/11/07, northband [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> BalanceMember [http://192.168.1.104:8000](http://192.168.1.104:8000)

Yes, you have the idea correct with the above lines.

My ideal setup would be to have Apache2 run a box fronting all my

> mongrels, have a cluster of 2-3 mongrel servers running several  
> instances of mongrel on each, and lastly have MySQL plugged into the  
> ring. My aim would be to be able to add mongrel machines as I need to  
> or replace if one goes out on me.

This is the setup I use and I would think it is fairly common.

Doing this, what kind of conflict may I be facing? Also will

> capastrano work well with this also?

You can use the deprec gem (lots of capistrano stuff tied together)  
which  
automatically generates all your configuration files etc for Ubuntu.

Any help appreciated!!! btw, I am using Ubuntu for this.

> -Northband
> 
> >

Thanks,  
Michael G.

---

<div class="post-metadata">

**Author:** ![northband](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ecae2f/32.png) [@northband](https://www.ruby-forum.com/u/northband)\
**Post date:** [February 12, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/apache2-mysql-mongrel-on-separate-machines/85259/3 "2007-02-12T12:08:46Z")

</div>

Great, thanks for the guidance.

-Northband
