Blob 存储 GZRS 复制的灾难恢复测试

时间:2021-03-11 19:00:25

标签: azure azure-storage azure-blob-storage

我们创建了一个存储 API,前端应用程序将调用它来从 Azure Blob 存储帐户检索数据。存储帐户位于加拿大中心,使用 GZRS 复制并使用私有端点。因此,现在我们必须进行 DR 测试,以确保存储帐户从主要区域故障转移到次要区域,并且存储 API 连接到次要区域并从次要区域而不是主要区域获取数据。因此,如果我们按照文章在门户中执行用户启动的故障转移 https://docs.microsoft.com/en-us/azure/storage/common/storage-initiate-account-failover?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-powershell

一旦主要区域关闭,存储 API 会自动将流量路由到次要区域吗? 我们有一个仅在具有私有端点 IP 的代码中定义的连接字符串

另外,我还有一个与此相关的问题。


在 GRS 或 GZRS 的情况下,存储帐户的辅助区域是否被视为配对区域,用户无法自行选择,对吗?

1 个答案:

答案 0 :(得分:0)

回答你的第一个问题: 从微软文档: from pyexcelerate import Workbook def df_to_excel(df1, df2, path, sheet_name1='Sheet 1', sheet_name2='Sheet 2'): data1 = [df1.columns] + list(df1.values) data2 = [df2.columns] + list(df2.values) wb = Workbook() wb.new_sheet(sheet_name1, data=data1) wb.new_sheet(sheet_name2, data=data2) #Just add another sheet wb.save(path) 链接到上述文档:https://docs.microsoft.com/en-us/learn/modules/ha-application-storage-with-grs/4-design-applications-ha-dr

但是您应该在您的应用程序中实现断路器模式,以便应用程序在再次启动并运行时再次从主要区域读取。 有关在您的应用程序中实现断路器模式的示例,请参阅:https://docs.microsoft.com/en-us/learn/modules/ha-application-storage-with-grs/5-exercise-deploy-ha-application

并回答您的第二个问题: 用户无法选择次要区域。 Azure 自动将配对区域用于 GRS/GZRS。 见:https://docs.microsoft.com/en-us/learn/modules/ha-application-storage-with-grs/2-storage-account-replication-features

When failover occurs, the secondary region becomes your new primary region, and all data is then accessible from this new primary region. All DNS records, which relate to your storage account, have their DNS endpoints updated to point to the new primary region. This redirection requires no changes to your application code.

相关问题