[英]How to write to Azure storage when the primary region down?
Our application uses RA-GZRS for storage which enables to read data from the secondary when the primary is down, but can't write to it.我们的应用程序使用 RA-GZRS 进行存储,当主服务器关闭时,它可以从辅助服务器读取数据,但无法写入。
Is there a solution which enables application to do both read from and write to storage in the event of an Azure region going down?如果 Azure 区域出现故障,是否有一种解决方案可以使应用程序同时读取和写入存储?
In Azure Storage, there can be only one region (primary) where you can write.在 Azure 存储中,只能有一个区域(主)可以写入。 The other region (secondary) will always be read only.另一个区域(次要)将始终是只读的。
One possible solution would be to do a manual failover so that the secondary region of your account becomes the primary and then you should be able to write to it.一种可能的解决方案是进行手动故障转移,以便您帐户的次要区域成为主要区域,然后您应该能够对其进行写入。 However, please be aware that the manual failover comes with a lots of caveats and make sure you understand those.但是,请注意手动故障转移有很多注意事项,并确保您理解这些。
You can read more about those things here: https://docs.microsoft.com/en-us/azure/storage/common/storage-initiate-account-failover?tabs=azure-portal#important-implications-of-account-failover .您可以在此处阅读有关这些内容的更多信息: https://docs.microsoft.com/en-us/azure/storage/common/storage-initiate-account-failover?tabs=azure-portal#important-implications-of-account -故障转移。
Please go through this .请通过此go 。 To quote from the article:引用文章:
If the primary region becomes unavailable, you can choose to fail over to the secondary region.如果主要区域不可用,您可以选择故障转移到次要区域。 After the failover has completed, the secondary region becomes the primary region, and you can again read and write data .故障转移完成后,次要区域成为主要区域,您可以再次读取和写入数据。 For more information on disaster recovery and to learn how to fail over to the secondary region, see Disaster recovery and storage account failover.有关灾难恢复的详细信息以及如何故障转移到次要区域,请参阅灾难恢复和存储帐户故障转移。
The tutorial here tells you how to build a highly available application that automatically switches between endpoints on a failure. 此处的教程将告诉您如何构建一个高可用性应用程序,该应用程序可在发生故障时在端点之间自动切换。 It uses a circuit breaker pattern.它使用断路器模式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.