实现数据库复制的两种方法中哪一种最好?
我们有两种方法来实现数据库复制:
- 主主复制。
- 主站、1 个主从站、1 个辅助从站。
我计划分析这两种方法并准备一份比较报告和建议。目前,我已经使用主主复制设置了复制环境。
请大家指点,并详细分析。
we have two approaches to achieve DB Replication:
- Master-Master replication.
- Master, 1 Primary Slave, 1 Secondary slave.
I am planning to analyze these two approaches and prepare a comparison report with a recommendation.Currently, I have setup the replication environment using Master-Master replication.
Please provide me some pointers with details analysis.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 使用 data-fabric gem 在 Rails 中进行 Postgresql 复制
这就是说,这里的一般建议再次值得注意。主主复制非常复杂,需要您非常详细地考虑冲突解决方案。可能需要编程才能做到这一点。
如果可能的话,选择主从。许多解决方案可能在这里“正常工作”。大师与大师永远不能保证“正常工作”。它需要大量额外的复杂性才能使其按照您希望的方式工作。
I put together a long, canonical answer to general replication questions at Postgresql replication in rails with data-fabric gem
This being said the general advice is worth noting here again. Master-master replication is incredibly complex and requires that you think through conflict resolution to a very high level of detail. It may require programming to do that.
If at all possible go with master-slave. Many solutions may "just work" here. Master-master can never be guaranteed to "just work." It requires a lot of additional complexity to make it work the way you want it to.