Ruby On Rails Master-Slave Postrgres Databases

2.2k Views Asked by At

I am currently setting up a master-slave app using Ruby on Rails that needs to have a Master-Slave backend. I'm currently looking at using Slony for the replication component, and Masochism for handling the read/write connections to the different DBs.

This is my first time setting up master-slave DBs with Ruby on Rails, and these are the two options I've seen come up the most. Have you worked with a better plugin for this situation in the past? The limit to the number of slaves in Slony isn't an issue for the situation, I should realistically only need one or two.

Thanks!

3

There are 3 best solutions below

1
On BEST ANSWER

If you're using Ruby, it would be sin not to try out rubyrep.

0
On

We used Slony and Masochism, but switched to Londiste and DataFabric and haven't looked back.

0
On

i personally use MySQL so my basic implementation might not work, but i used Masochism too and moved to DataFabric, which supports more slaves and sharding as well as replication mechanisms.