azure - 具有主动-主动 Azure Sql Server 数据库复制

标签 azure azure-sql-database

我们可以对 Azure SQL 数据库进行被动只读异步实时同步,以实现灾难恢复。

但我们的要求是在两个事件读写数据库之间实现实时同步,以便为世界不同地点的客户提供低延迟。

例如:

I'm providing e-commerce website, I will update data in one of the database server and other connected databases in sync with this database should get updates.

Users from different servers of the world will get connected to their nearest data center for low latency. If someone buys something or puts some review, it should get updated in all other databases. In this way we need active-active database sync.

我们就此探索了多个项目,但没有发现任何相关内容。

任何人都可以指导我如何实现这一目标吗?

最佳答案

SQL Server 有 Peer-to-Peer Transactional Replication ,但您需要确保在应用程序中不会在多个节点上引入冲突的更改。

SQL Server 还有 Merge Replication ,它允许任何订阅者进行更新,并支持自定义冲突解决。

这些都可以在 SQL Server VM 上使用。有限公司replication Azure SQL 数据库托管实例上提供了这些选项。 Azure SQL 数据库还有 Data Sync .

Azure Cosmos DB 还支持Multi-Master .

无论哪种情况,多主机都会带来显着的成本/复杂性。通常,最好只有一个可写主服务器和区域可读副本。在该配置中,应用程序需要连接到全局主服务器进行写入,但可以从本地副本读取。对于这种模式,您可以简单地使用 Failover Groups .

关于azure - 具有主动-主动 Azure Sql Server 数据库复制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61936482/

相关文章:

azure - 通过 Azure AD 身份验证进行声明增强

sql-server - Azure SQL 数据库 DTU 指标

azure - 如何向客户公开 SQL Azure 数据库的子集以进行报告?

c# - 在 Azure 上运行重复任务

c# - Azure 数据库同步

r - 使用 R 内核在 Azure ML Notebook 中创建数据框

azure - API 连接 - ARM 模板中的用户名和密码

visual-studio - 从 Visual Studio 进行 Azure 网站部署 - 如何仅部署一个缺少的程序集?

asp.net-mvc - 使用 MVC 应用程序和 SendGrid 的 Azure SQL 存储过程

SQL-Azure 性能,添加数据库还是添加服务器?