I currently setting up a master slave configuration with MySQL where I will have 1 master for reads/writes and a slave for reads. Just looking around, I see the Masochism plugin was written for this. Has anyone used this and does it work well in a production environment with high traffic? Are there any better solutions? Thanks! -- Posted via http://www.ruby-forum.com/.
> I currently setting up a master slave configuration with MySQL where I > will have 1 master for reads/writes and a slave for reads. Just > looking > around, I see the Masochism plugin was written for this. Has anyone > used this and does it work well in a production environment with high > traffic? Are there any better solutions? Thanks!I haven''t used that one, but we used another one (mysql_replication_adapter I think it was). That one worked well. Where we used that one I heard they switched over to this one and love it. The site is huge too so meets your criteria. -philip
I installed masochism and it works very well. The only problem is that there is a conflict with another plugin -> use_db. Masochism seems to override the use_db database I set, so its looking for the database from the master/slave configuration in database.yml. Anybody got a workaround? I am looking at tweaking the plugin code right now, but if someone has already done this, let me know. Thanks! -- Posted via http://www.ruby-forum.com/.
http://github.com/mauricio/master_slave_adapter/tree/master - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Aug 19, 2009 at 4:05 PM, Yanni Mac<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I installed masochism and it works very well. The only problem is that > there is a conflict with another plugin -> use_db. Masochism seems to > override the use_db database I set, so its looking for the database from > the master/slave configuration in database.yml. Anybody got a > workaround? I am looking at tweaking the plugin code right now, but if > someone has already done this, let me know. Thanks! > -- > Posted via http://www.ruby-forum.com/. > > > >
Linhares wrote:> http://github.com/mauricio/master_slave_adapter/tree/master > > - > Maur�cio Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Wed, Aug 19, 2009 at 4:05 PM, YanniMaurício, Thanks for creating this plugin.. you saved me a ton of time! Its exactly what I needed. With this I am able to configure master/slave on any database, but it still allows me not to use it on non-replicated databases I have set up with use_db. -- Posted via http://www.ruby-forum.com/.
My woes were a little bit like yours, Masochism broke badly with the then current rails (2.2) and I had to find a solution. None were available so I just took the simplest solution (that should have been the only solution...) that was a "fake" db adapter that handled the calls to a master/slave connection as needed. Shout if you have any troubles using it. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Thu, Aug 20, 2009 at 10:39 AM, Yanni Mac<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Linhares wrote: >> http://github.com/mauricio/master_slave_adapter/tree/master >> >> - >> Maur�cio Linhares >> http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr >> >> >> >> On Wed, Aug 19, 2009 at 4:05 PM, Yanni > > Maurício, > > Thanks for creating this plugin.. you saved me a ton of time! Its > exactly what I needed. With this I am able to configure master/slave on > any database, but it still allows me not to use it on non-replicated > databases I have set up with use_db. > -- > Posted via http://www.ruby-forum.com/. > > > >