Distribute server load among 2-3 servers

Fellow Ruby’ers,

So I have created a site running of ruby and (of course) it became an
instant success. So here is the problem. I have 3 servers and the site
currently has one server to itself. The other 2 servers have minimal
duties and sit at low cpu usage all day. So what I’d like to do is for
Ruby to distribute the server load on some of the other servers. I read
that this is possible but I’m not advanced enough to know how to do
that. So if any of you have any ideas on how to do that, that would be
great. This is an image hosting site and the biggest tasks are image
upload and image retrieval (showing em). Thank-you for your help :slight_smile:

-Jake

Try reading about mongrel_cluster

If you are feeling saucy, use Capistrano to deploy it across the
servers.

I personally have no experience with balancing across servers but
that’s what I know :slight_smile:

Cheers
Zach I.
→ Blog – http://www.zachinglis.com
→ Company – http://www.lt3media.com
→ Portfolio – http://portfolio.zachinglis.com

Jake F. wrote:

So I have created a site running of ruby and (of course) it became an
instant success. So here is the problem. I have 3 servers and the site
currently has one server to itself. The other 2 servers have minimal
duties and sit at low cpu usage all day.

Simplest setup in my mind is going to be using Apache mod_rewrite to
distribute the incoming requests via round-robin assignment. If you
google aorund you should find some useful docs.

Once you have that up and running you should be up and running pretty
quickly. Assign one machine as the DB server, point the others at it
using the db configs in Rails. Make sure sessions are on the DB too.

Without making a massive post that should get you started.

HAproxy:

gustin

http://www.entryway.net

On Jun 7, 8:28 am, Douglas S. [email protected]