Search code examples
ruby-on-railsrubydatabasemultiple-databases

Multiple databases in Rails


I'm trying to setup two database for a single Rails Application. The first one is would be the main database and the second would be there in the case the main database would crash. So, I need to manage the two databases (rake db:create, migrate...) and replicate the datas to the second one. Does anybody know how to do this ?


Solution

  • You should not do that on Application Layer.

    Use keepalived or Amazon RDS.