Surgical slave reads for Ruby on Rails, mulitple databases.
Posted
by Daniel
on Stack Overflow
See other posts from Stack Overflow
or by Daniel
Published on 2010-05-03T18:21:36Z
Indexed on
2010/05/31
5:12 UTC
Read the original article
Hit count: 361
Greetings,
I'm currently working on a multiple database rails application.
I want to off load the SELECT queries on to the slave databases
for only SOME of the databases or specific models.
The issue is that in places, we swap out the current database connection and put in a different one for a short time; to load fixtures or to handle sharding.
Does anyone have any recommendations on a ruby gem that
1. will split select/(sql writes) with a considerable amount of control.
We want to handle just some models and we are looking for a neat surgical fix.
2. does not monkey around with activerecord.
3. is still being maintained.
TIA
-daniel
© Stack Overflow or respective owner