我已经构建了一个 ASP .Net 5 网站和 Web API 以及支持 SQL 数据库的架构。我现在想要超越测试并将它们部署到 Azure。我想跨大陆复制整个服务(ASP 和 SQL),以便在美国使用我们应用程序的用户被路由到美国的服务器,在欧洲使用我们应用程序的用户被路由到欧洲的服务器,等等。有些东西可以使不同大陆的数据库副本保持同步。
我找不到有关如何执行此操作的文档。我找到了有关在 Azure 中异地复制 SQL Server 的文档,但该文档针对的是希望将数据安全地备份到另一个位置(例如,灾难恢复)的人们,而我需要多个实时位置,每个位置都接受 CRUD地点。
我该怎么做?如何保持数据库同步以及如何将流量从应用路由到最近的 Azure 服务副本?
(注:我不确定那些归结为查找文档请求的问题是否符合 Stack Overflow 的条件,如果这里不欢迎这种情况,我们深表歉意。)
最佳答案
我的文章Design an application for cloud disaster recovery using geo-replication in SQL Database应该有帮助。
在本文中,我介绍了灾难恢复的三种设计模式:
- 使用托管数据库进行云灾难恢复的主动-被动部署
- 用于应用负载平衡的主动-主动部署
- 用于数据保存的主动-被动部署
这是涵盖您的场景的第二个。
下面是文章中概述该模式的段落。
In this pattern, the application switches to read-only mode when connected to the secondary database. The application logic in the primary region is colocated with the primary database and operates in read-write mode (RW), the application logic in the secondary region is colocated with the secondary database and is ready to operate in read-only mode (RO). Traffic manager should be set up to use failover routing with end-point monitoring enabled for both application instances.
下面的图表总结了如果您遵循本文中的建议,您最终将得到的架构。
my article中有更多详细信息;如果您还有其他问题,请随时发帖,我会跟进。
关于asp.net - 对 Azure 托管 ASP .Net 5 站点进行地理复制和流量路由,并跨大洲支持 SQL 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35427359/