異地備援儲存體 (GRS):適用於 Azure 儲存體的跨區域複寫Geo-redundant storage (GRS): Cross-regional replication for Azure Storage

異地備援儲存體 (GRS) 設計為將您的資料複寫到與主要區域相隔數百英哩遠的次要區域,以在指定年份為物件提供至少 99.99999999999999% (16 9's) 的持久性。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 會將您的資料複寫到次要區域中的另一個資料中心,但如果 Microsoft 起始從主要到次要區域的容錯移轉,該資料則為唯讀。GRS replicates your data to another data center in a secondary region, but that data is available to be read only if Microsoft 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,不論 Microsoft 是否起始從主要到次要區域的容錯移轉,您都可以從次要區域讀取。With RA-GRS, you can read from the secondary region regardless of whether Microsoft 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:

  • 異地區域冗余儲存體 (切換) (預覽) 會以同步方式將資料複寫到三個 Azure 可用性區域, 並以非同步方式將資料複寫到次要區域, 藉此提供高可用性和最大耐久性。Geo-zone-redundant storage (GZRS) (preview) provides high availability together with maximum durability by replicating data synchronously across three Azure availability zones and then replicating data asynchronously to the secondary region. 您也可以啟用次要區域的讀取權限。You can also enable read access to the secondary region. 切換的設計目的是要在指定的一年內提供至少 99.99999999999999% (16 個 9) 的物件持久性。GZRS is designed to provide at least 99.99999999999999% (16 9's) durability of objects over a given year. 如需切換的詳細資訊, 請參閱高可用性和最大持久性 (預覽) 的異地區域冗余儲存體For more information on GZRS, see Geo-zone-redundant storage for highly availability and maximum durability (preview).
  • 區域冗余儲存體 (ZRS) 可跨三個 Azure 可用性區域的同步複寫提供高可用性, 而且在某些情況下可能是比 GRS 或 RA-GRS 更好的選擇。Zone-redundant storage (ZRS) provides highly availability with synchronous replication across three Azure availability zones and may be a better choice for some scenarios than GRS or RA-GRS. 如需有關 ZRS 的詳細資訊,請參閱 ZRSFor more information on ZRS, see ZRS.
  • 非同步複寫會涉及從將資料寫入主要區域,到將資料複寫至次要區域這段時間的延遲。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 時,複本不提供讀取或寫入存取,除非 Microsoft 起始對次要區域的容錯移轉。With GRS, the replica isn't available for read or write access unless Microsoft 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.
  • 如果您的應用程式需要從次要區域讀取, 請啟用 [GRS] 或 [RA-切換 (預覽)]。If your application needs to read from the secondary region, enable RA-GRS or RA-GZRS (preview).

讀取權限異地備援儲存體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. 次要端點與主要端點類似,但會在帳戶名稱中附加尾碼 –secondaryThe secondary endpoint is similar to the primary endpoint, but appends the suffix –secondary to the account name. 例如,如果 Blob 服務的主要端點是 myaccount.blob.core.windows.net,則次要端點會是 myaccount-secondary.blob.core.windows.netFor example, if your primary endpoint for the Blob service is myaccount.blob.core.windows.net, then your secondary endpoint is myaccount-secondary.blob.core.windows.net. 主要和次要端點會有相同的儲存體帳戶存取金鑰。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.
  • 如果您將 GRS 或 RA-GRS 帳戶進行帳戶容錯移轉 (預覽) 至次要區域,該帳戶的寫入權限則會在容錯移轉完成後還原。If you initiate an account failover (preview) of a GRS or RA-GRS account to the secondary region, write access to that account is restored after the failover has completed. 如需詳細資訊,請參閱災害復原和儲存體帳戶容錯移轉 (預覽)For more information, see Disaster recovery and storage account failover (preview).
  • 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.

RPO 和使用 GRS 的 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. 主要區域無法使用時,您可以執行次要區域的帳戶容錯移轉 (預覽)。In the event that the primary region becomes unavailable, you can perform an account failover (preview) to the secondary region. 進行容錯移轉時,尚未異地複寫的最近變更可能會遺失。When you initiate a failover, 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:

  • 客戶對於儲存體帳戶從主要區域到次要區域進行容錯移轉之前的時間。The time until the customer initiates the failover of the storage account from the primary to the secondary region.
  • Azure 變更主要 DNS 項目以指向次要位置來執行容錯移轉所需的時間。The time required by Azure to perform the failover by changing the primary DNS entries to point to the secondary location.

配對的區域Paired regions

建立儲存體帳戶時,您可以為帳戶選取主要區域。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. 如需有關 Azure 所支援區域的最新資訊,請參閱商務持續性和災害復原 (BCDR):Azure 配對區域For up-to-date information about regions supported by Azure, see Business continuity and disaster recovery (BCDR): Azure paired regions.

另請參閱See also