异地冗余存储 (GRS)：Azure 存储的跨区域复制Geo-redundant storage (GRS): Cross-regional replication for Azure Storage
异地冗余存储 (GRS) 设计为在给定的一年内提供至少 99.99999999999999%（16 个 9）的对象持久性，它将数据复制到与主要区域相距数百英里的辅助区域。Geo-redundant storage (GRS) is designed to provide at least 99.99999999999999% (16 9's) durability of objects over a given year by replicating your data to a secondary region that is hundreds of miles away from the primary region. 如果存储帐户启用了 GRS，则即使遇到区域完全停电或导致主区域不可恢复的灾难，数据也能持久保存。If your storage account has GRS enabled, then your data is durable even in the case of a complete regional outage or a disaster in which the primary region isn't recoverable.
如果选择启用 GRS，可从两个相关选项中进行选择：If you opt for GRS, you have two related options to choose from:
- GRS 将数据复制到次要区域中的另一个数据中心，但仅当 Azure 发起了从主要区域到次要区域的故障转移时，这些数据才可供读取。GRS replicates your data to another data center in a secondary region, but that data is available to be read only if Azure initiates a failover from the primary to secondary region.
- 读取访问异地冗余存储 (RA-GRS) 基于 GRS。Read-access geo-redundant storage (RA-GRS) is based on GRS. RA-GRS 将数据复制到次要区域中的另一个数据中心，同时还提供从次要区域读取数据的选项。RA-GRS replicates your data to another data center in a secondary region, and also provides you with the option to read from the secondary region. 如果使用 RA-GRS，无论 Azure 是否发起从主要区域到次要区域的故障转移，都能从次要区域读取数据。With RA-GRS, you can read from the secondary region regardless of whether Azure initiates a failover from the primary to secondary region.
对于已启用 GRS 或 RA-GRS 的存储帐户，首先会使用本地冗余存储 (LRS) 复制所有数据。For a storage account with GRS or RA-GRS enabled, all data is first replicated with locally redundant storage (LRS). 首先将更新提交到主要位置，并使用 LRS 复制更新。An update is first committed to the primary location and replicated using LRS. 然后，使用 GRS 以异步方式将更新复制到次要区域。The update is then replicated asynchronously to the secondary region using GRS. 将数据写入次要位置后，还会使用 LRS 在该位置复制数据。When data is written to the secondary location, it's also replicated within that location using LRS.
主要和次要区域在一个存储缩放单元内管理跨单独的容错域和升级域管理副本。Both the primary and secondary regions manage replicas across separate fault domains and upgrade domains within a storage scale unit. 存储缩放单元是数据中心内的基本复制单元。The storage scale unit is the basic replication unit within the datacenter. 此级别的复制由 LRS 提供；有关详细信息，请参阅本地冗余存储 (LRS)：Azure 存储的低成本数据冗余。Replication at this level is provided by LRS; for more information, see Locally redundant storage (LRS): Low-cost data redundancy for Azure Storage.
确定要使用哪个复制选项时，请记住以下几点：Keep these points in mind when deciding which replication option to use:
- 对于异步复制，从数据写入到主要区域到数据复制到次要区域，这之间存在延迟。Asynchronous replication involves a delay from the time that data is written to the primary region, to when it is replicated to the secondary region. 发生区域性灾难时，如果无法从主要区域中恢复数据，则尚未复制到次要区域的更改可能会丢失。In the event of a regional disaster, changes that haven't yet been replicated to the secondary region may be lost if that data can't be recovered from the primary region.
- 使用 GRS 时，副本不可用于读取或写入访问，除非 Azure 启动到次要区域的故障转移。With GRS, the replica isn't available for read or write access unless Azure initiates a failover to the secondary region. 如果发生故障转移，则在故障转移完成后，你将具有对该数据的读取和写入访问权限。In the case of a failover, you'll have read and write access to that data after the failover has completed. 有关详细信息，请参阅灾难恢复指南。For more information, please see Disaster recovery guidance.
- 如果应用程序需要从次要区域读取数据，请启用 RA-GRS。If your application needs to read from the secondary region, enable RA-GRS.
读取访问异地冗余存储Read-access geo-redundant storage
读取访问异地冗余存储 (RA-GRS) 可最大程度提高存储帐户的可用性。Read-access geo-redundant storage (RA-GRS) maximizes availability for your storage account. 除了跨两个区域的异地复制之外，RA-GRS 提供对次要位置中的数据的只读访问。RA-GRS provides read-only access to the data in the secondary location, in addition to geo-replication across two regions.
当启用对次要区域中的数据的只读访问权限时，可以在存储帐户的辅助终结点以及主终结点上获取数据。When you enable read-only access to your data in the secondary region, your data is available on a secondary endpoint as well as on the primary endpoint for your storage account. 辅助终结点与主终结点类似，但会在帐户名称后面追加后缀
-secondary 。The secondary endpoint is similar to the primary endpoint, but appends the suffix
-secondary to the account name. 例如，如果 Blob 服务的主终结点是
myaccount-secondary.blob.core.chinacloudapi.cn。For example, if your primary endpoint for the Blob service is
myaccount.blob.core.chinacloudapi.cn, then your secondary endpoint is
myaccount-secondary.blob.core.chinacloudapi.cn. 存储帐户的访问密钥对于主终结点和辅助终结点是相同的。The access keys for your storage account are the same for both the primary and secondary endpoints.
使用 RA-GRS 时需要注意一些注意事项：Some considerations to keep in mind when using RA-GRS:
- 应用程序必须管理在使用 RA-GRS 时要与哪些终结点进行交互。Your application has to manage which endpoint it is interacting with when using RA-GRS.
- 由于异步复制涉及延迟，因此如果无法将数据从主要区域中恢复，则尚未复制到次要区域的更改可能会丢失。Since asynchronous replication involves a delay, changes that haven't yet been replicated to the secondary region may be lost if data can't be recovered from the primary region.
- 可以检查存储帐户的上次同步时间。You can check the Last Sync Time of your storage account. 上次同步时间是 GMT 日期/时间值。Last Sync Time is a GMT date/time value. 在上次同步时间之前主要位置的写入内容已成功写入次要位置，这意味着可以从次要位置读取这些内容。All primary writes before the Last Sync Time have been successfully written to the secondary location, meaning that they are available to be read from the secondary location. 在上次同步时间之后发生的主位置写入可能可供读取，也可能尚不可供读取。Primary writes after the Last Sync Time may or may not be available for reads yet. 可以使用 Azure 门户、Azure PowerShell 或通过 Azure 存储客户端库之一查询此值。You can query this value using the Azure portal, Azure PowerShell, or from one of the Azure Storage client libraries.
- 如果 Azure 启动了到次要区域的故障转移，则在故障转移完成以后，将恢复你对该帐户的读写访问权限。If Azure initiates failover to the secondary region, you'll have read and write access to that account is restored after the failover has completed. 有关详细信息，请参阅灾难恢复指南。For more information, see Disaster recovery guidance.
- 要实现高可用性时使用 RA-GRS。RA-GRS is intended for high-availability purposes. 有关可伸缩性的指南，请查看性能清单。For scalability guidance, review the performance checklist.
- 有关如何使用 RA-GRS 进行高可用性设计的建议，请参阅使用 RA-GRS 存储设计高可用性应用程序。For suggestions on how to design for high availability with RA-GRS, see Designing Highly Available Applications using RA-GRS storage.
什么是采用 GRS 的 RPO 和 RTO？What is the RPO and RTO with GRS?
恢复点目标 (RPO)： 在 GRS 和 RA-GRS 中，存储服务以异步方式将数据从主位置异地复制到辅助位置。Recovery Point Objective (RPO): In GRS and RA-GRS, the storage service asynchronously geo-replicates the data from the primary to the secondary location. 在主要区域发生故障时，Azure 会故障转移到次要区域。In the event that the primary region, Azure performs a failover to the secondary region. 如果发生故障转移，则尚未进行异地复制的最近更改可能会丢失。If a failover happens, recent changes that haven't yet been geo-replicated may be lost. 丢失的潜在数据的分钟数称为 RPO。The number of minutes of potential data that's lost is known as the RPO. RPO 指示可以将数据恢复到的时间点。The RPO indicates the point in time to which data can be recovered. Azure 存储的 RPO 通常小于 15 分钟，但目前没有 SLA 规定异地复制所用时长。Azure Storage typically has an RPO of less than 15 minutes, although there's currently no SLA on how long geo-replication takes.
恢复时间目标 (RTO)： RTO 用于度量执行故障转移以及将存储帐户恢复联机所花费的时间。Recovery Time Objective (RTO): The RTO is a measure of how long it takes to perform the failover and get the storage account back online. 执行故障转移的时间包括以下操作：The time to perform the failover includes the following actions:
- Azure 确定是否可以在主要位置恢复数据或是否需要故障转移所需的时间The time Azure requires to determine whether the data can be recovered at the primary location or if a failover is necessary
- Azure 通过将主要 DNS 条目更改为指向次要位置来执行故障转移所需的时间The time required by Azure to perform the failover by changing the primary DNS entries to point to the secondary location.
创建存储帐户时，可以为帐户选择主要区域。When you create a storage account, you select the primary region for the account. 配对的次要区域是根据主要区域确定的且无法更改。The paired secondary region is determined based on the primary region, and can't be changed.