Forum: Ruby on Rails Distribute server load among 2-3 servers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jacob J. (Guest)
on 2007-06-07 08:27
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 :)

-Jake
Zach I. // LT3media (Guest)
on 2007-06-07 16:18
(Received via mailing list)
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 :)

Cheers
Zach I.
→ Blog -- http://www.zachinglis.com
→ Company -- http://www.lt3media.com
→ Portfolio -- http://portfolio.zachinglis.com
Douglas S. (Guest)
on 2007-06-07 16:28
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.
gustin (Guest)
on 2007-06-08 15:41
(Received via mailing list)
HAproxy:

http://haproxy.1wt.eu/

gustin

http://www.entryway.net

On Jun 7, 8:28 am, Douglas S. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.