首页 > 解决方案 > Blob 存储 GZRS 复制的 DR 测试

问题描述

我们创建了一个存储 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 的情况下,存储帐户的次要区域是否被视为配对区域,这是什么,用户无法自行选择,对吗?

标签: azureazure-storageazure-blob-storage

解决方案


要回答您的第一个问题: 来自微软文档: 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. 链接到上述文档: https ://docs.microsoft.com/en-us/learn/modules/ha-application-storage-with-grs/4-design-applications-哈博士

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

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

Geo-zone-redundant storage (GZRS) combines the high availability benefits of ZRS with GRS. With this replication type, your data is copied across three availability zones in one region. Data is also replicated three times to another secondary region that's paired with it. This way, your zone-redundant data is also secure from regional level outage.


推荐阅读