Ruby On Rails 主从 Postrgres 数据库
我目前正在使用 Ruby on Rails 设置一个主从应用程序,需要有一个主从后端。我目前正在考虑使用 Slony 作为复制组件,以及 Masochism 用于处理与不同数据库的读/写连接。
这是我第一次使用 Ruby on Rails 设置主从数据库,这是我看到最多的两个选项。您过去是否使用过更好的插件来应对这种情况?斯洛尼的奴隶数量限制对于目前的情况来说不是问题,实际上我应该只需要一两个。
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您使用 Ruby,那么不尝试 rubyrep 就太可惜了。
If you're using Ruby, it would be sin not to try out rubyrep.
我个人使用MySQL,所以我的基本实现可能不起作用,但我也使用受虐狂并转移到 DataFabric< /a>,支持更多从属和分片以及复制机制。
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.
我们使用了 Slony 和 Masochism,但改用了 Londiste 和 DataFabric 并且没有回头。
We used Slony and Masochism, but switched to Londiste and DataFabric and haven't looked back.