Hi, I was just wondering if there was any mechanism in rails 3 to
programmatically change the database targeted by active record? I'm
asking about this so as to be able to take advantage of database
replication to provide a fail over strategy. Beyond that it would also
make load balancing slave databases easier.
I'm making use of PostgreSQL if this changes anything.
Actually any information dealing with database failure recovery would
come in handy.
In reply to this post by Soullkiller2 Soullkiller2
Thanks those are both useful. I've seen the PostgreSQL docs page on
scaling but as far as I can tell it deals with scaling from the
I'm more concerned with scaling rails access to the database. I've had a
look at Octopus https://github.com/tchandy/octopus as a potential
solution. But Octopus relies on a static configuration file to detail
all the available instances. This kind of precludes any form of failure
recovery strategy that doesn't involve shutting down each rails instance
and changing that file.
My dream method would be to on database failure, have each rails
instance automatically pull the next databases url from somewhere and
change their targeted db on the fly.
On Mon, Mar 26, 2012 at 2:24 AM, Allan Wind
<[hidden email]> wrote:
> On 2012-03-26 03:11:02, Stuart J. wrote:
>> Actually any information dealing with database failure recovery would
>> come in handy.
> Are you familiar with this resource? One of the first things
> that show up when you search for postgresql high available:
That's nearly 5 years old and so misses all the cool new replication features.