[Backgroundrb-devel] Load balancing

skaar skaar at waste.org
Thu Jan 11 19:06:50 EST 2007


* Robert Bjarnason (robert.bjarnason at gmail.com) [070111 16:56]:
> Hi Erik,
> 
> Thanks for the pointer, I have used JavaSpaces in the past and really 
> like this pattern.
> 
> However, my workers are user initiated and trigger x264 and mp4box video 
> encoding/editing processes and I'm planning to have a limit of 1-2 
> simulations backgroundrb processes running on each physical server.
> 
> I have an entry in the database for each user initiated job, maybe I can 
> add the IP of each backgroundrb server to that entry and do the 
> load-balancing in Rails using the database?  The question then is how do 
> I dynamically change the backgroundrb server IP for each instantiated 
> MiddleMan object?

you can use BackgrounDRb::MiddleManDRbObject and instead of calling the
MiddleMan constant, use a regular object - actually it's a class method
which takes a DRb uri as it's argument - behaves just like the
MiddleMan.

/skaar


> 
> Warm regards,
> Robert Bjarnason
> 
> ps. here are links to the sites that are currently using 
> backgroundrb-2.1 more or less successfully in production mode:
> http://store.longwayround.com/
> http://store.missingface.com/
> http://store.racetodakar.com/
> http://store.murderormutiny.com/
> 
> Erik Morton wrote:
> > We chose to bypass MiddleMan and place our requests for workers into a 
> > queue. This way we can create an arbitrary number of workers that loop 
> > and ask the queue for work. The Mongrels have no need to know the 
> > location or number of workers. You will of course need another 
> > strategy to get progress/results from the workers.
> >
> > On Jan 11, 2007, at 4:41 PM, Robert Bjarnason wrote:
> >
> >> Hi,
> >>
> >> Can somebody point me in the right direction about what approach would
> >> be best to load-balance between two or more physical servers running
> >> backgroundrb while using  BackgrounDRb::Worker::RailsBase with mongrel?
> >>
> >> Thanks,
> >> Robert Bjarnason
> >>
> >> _______________________________________________
> >> Backgroundrb-devel mailing list
> >> Backgroundrb-devel at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
> >
> >
> 
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel

-- 
----------------------------------------------------------------------
|\|\             where in the       |          s_u_b_s_t_r_u_c_t_i_o_n 
| | >===========  W.A.S.T.E.        |                  genarratologies 
|/|/    (_)     is the wisdom       |                  skaar at waste.org
----------------------------------------------------------------------


More information about the Backgroundrb-devel mailing list