Ruby On Rails Master-Slave Postrgres Databases
-
19-09-2019 - |
Question
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!
Solution
If you're using Ruby, it would be sin not to try out rubyrep.
OTHER TIPS
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.
We used Slony and Masochism, but switched to Londiste and DataFabric and haven't looked back.