Skip to content

Commit ed90fb5

Browse files
Doc updates
1 parent cd7705e commit ed90fb5

File tree

1 file changed

+11
-37
lines changed

1 file changed

+11
-37
lines changed

articles/storage/blobs/storage-retry-policy.md

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,64 +5,38 @@ author: pauljewellmsft
55
ms.author: pauljewell
66
ms.service: storage
77
ms.topic: how-to
8-
ms.date: 08/23/2022
8+
ms.date: 09/16/2022
99
ms.custom: template-how-to
1010
---
1111

1212
# Implement a retry policy for Azure Storage services
1313

14-
Any application that runs in the cloud or communicates with remote services and resources must be able to handle transient faults. It's common for cloud applications and services to experience faults due to a momentary loss of network connectivity, a request timeout when a service or resource is busy, or other factors. Developers should build applications to handle transient faults transparently to improve stability and resiliency.
14+
Any application that runs in the cloud or communicates with remote services and resources must be able to handle transient faults. It's common for these applications to experience faults due to a momentary loss of network connectivity, a request timeout when a service or resource is busy, or other factors. Developers should build applications to handle transient faults transparently to improve stability and resiliency.
1515

16-
This article shows you how to set up a basic retry strategy for an application that connects to Azure blob storage. This strategy is one element to consider as part of a broader retry policy for your application.
16+
This article shows you how to use .NET client libraries to set up a retry policy for an application that connects to Azure blob storage. Retry policies define how the application handles failed requests, and should always be tuned to match the business requirements of the application and the nature of the failure.
1717

18-
<!-- 3. Prerequisites
19-
Optional. If you need prerequisites, make them your first H2 in a how-to guide.
20-
Use clear and unambiguous language and use a list format.
21-
-->
22-
23-
## Prerequisites
24-
25-
- <!-- prerequisite 1 -->
26-
- <!-- prerequisite 2 -->
27-
- <!-- prerequisite n -->
28-
<!-- remove this section if prerequisites are not needed -->
29-
30-
<!-- 4. H2s
31-
Required. A how-to article explains how to do a task. The bulk of each H2 should be
32-
a procedure.
33-
-->
18+
> [!NOTE]
19+
> The examples in this article assume that you're working with an existing app or that you've created a sample console app using the guidance in the [Get started with Azure Blob Storage and .NET](storage-blob-dotnet-get-started.md) article.
3420
3521
## Configure retry options
36-
Retry policies for Azure storage services are configured programmatically, offering control over how retry options are applied to various services and scenarios. It's important to note that any retry policy should be tuned to match the business requirements of the application and that nature of the failure.
22+
Retry policies for Azure storage services are configured programmatically, offering control over how retry options are applied to various service requests and scenarios. For example, a web app issuing requests based on user interaction might implement a policy with fewer retries and shorter delays to increase responsiveness and notify the user when an error occurs. Alternatively, an app or component running batch requests in the background might increase the number of retries and use an exponential backoff strategy to allow the request time to complete successfully.
3723

38-
In this example for blob storage, we'll define the retry options in the `Retry` property of the `BlobClientOptions` class.
24+
In this example for blob storage, we'll configure the retry options in the `Retry` property of the [BlobClientOptions](/dotnet/api/azure.storage.blobs.blobclientoptions) class. Then, we'll create a client object for the blob service using the retry options.
3925

4026
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/Retry.cs" id="Snippet_RetryOptions":::
4127

42-
Next, we'll create a client object for the blob service with the retry options defined above.
43-
44-
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/Retry.cs" id="Snippet_RetryOptionsCreateClient":::
45-
46-
This method of instantiating `blobServiceClient` means that each service request issued from the client will use the retry options as defined in the parameter `blobOptions`. You can configure various retry strategies and service clients based on the needs of your app.
28+
In the code above, each service request issued from `blobServiceClient` will use the retry options as defined in `blobOptions`. You can configure various retry strategies for service clients based on the needs of your app.
4729

4830
## Use geo-redundancy to improve app resiliency
49-
If your app requires high availability and greater resiliency against failures, you can leverage Azure Storage geo-redundancy options. Storage accounts configured for geo-redundant replication are synchronously replicated in the primary region, and asynchronously replicated to a secondary region that is hundreds of miles away.
31+
If your app requires high availability and greater resiliency against failures, you can leverage Azure Storage geo-redundancy options as part of your retry policy. Storage accounts configured for geo-redundant replication are synchronously replicated in the primary region, and asynchronously replicated to a secondary region that is hundreds of miles away.
5032

5133
Azure Storage offers two options for geo-redundant replication: [Geo-redundant storage (GRS)](storage-redundancy.md#geo-redundant-storage) and [Geo-zone-redundant storage (GZRS)](storage-redundancy.md#geo-zone-redundant-storage). To make use of geo-redundancy options in your app, make sure that your storage account is configured for read-access geo-redundant storage (RA-GRS) or read-access geo-zone-redundant storage (RA-GZRS). If it's not, you can learn more about how to [change your storage account replication type](redundancy-migration.md).
5234

5335
In this example, we set the `GeoRedundantSecondaryUri` property in `BlobClientOptions`. When this property is set, read request failures in the primary region will seamlessly switch to perform retries against the secondary region endpoint.
5436

55-
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/Retry.cs" id="Snippet_RetryOptionsGRS":::
56-
57-
Next, we'll create a client object for the blob service with the options defined in `blobOptionsGRS`.
58-
59-
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/Retry.cs" id="Snippet_RetryOptionsCreateClientGRS":::
37+
:::code language="csharp" source="~/azure-storage-snippets/blobs/howto/dotnet/dotnet-v12/Retry.cs" id="Snippet_RetryOptionsGRS" highlight="20":::
6038

61-
## Remarks
62-
<!-- Introduction paragraph -->
63-
1. <!-- Step 1 -->
64-
1. <!-- Step 2 -->
65-
1. <!-- Step n -->
39+
Apps that use geo-redundant storage To learn more about design considerations when using geo-redundancy, see [Use geo-redundancy to design highly available applications](../common/geo-redundant-design.md).
6640

6741
## Next steps
6842

0 commit comments

Comments
 (0)