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. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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: <http://www.postgresql.org/docs/8.3/static/high-availability.html> Another resource you probably want to check out out Pacemaker: <http://www.clusterlabs.org/> /Allan -- Allan Wind Life Integrity, LLC <http://lifeintegrity.com> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 databases end. 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. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Mar 26, 2012 at 2:24 AM, Allan Wind <allan_wind-iEsJZalW0vV5uzFS8dxClQC/G2K4zDHf@public.gmane.org> 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: > <http://www.postgresql.org/docs/8.3/static/high-availability.html>That''s nearly 5 years old and so misses all the cool new replication features. Latest production http://www.postgresql.org/docs/9.1/static/high-availability.html Latest development http://www.postgresql.org/docs/devel/static/high-availability.html> Another resource you probably want to check out out Pacemaker: > <http://www.clusterlabs.org/>And also http://www.repmgr.org/ -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.