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
on 2007-06-07 06:27
on 2007-06-07 14:18
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 Inglis â†’ Blog -- http://www.zachinglis.com â†’ Company -- http://www.lt3media.com â†’ Portfolio -- http://portfolio.zachinglis.com
on 2007-06-07 14:28
Jake Fake 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.