You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/blobs/storage-retry-policy.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: pauljewellmsft
6
6
ms.author: pauljewell
7
7
ms.service: azure-blob-storage
8
8
ms.topic: how-to
9
-
ms.date: 08/05/2024
9
+
ms.date: 11/19/2024
10
10
ms.custom: devx-track-dotnet, devguide-csharp
11
11
---
12
12
@@ -26,10 +26,13 @@ The following table lists the properties of the [RetryOptions](/dotnet/api/azure
26
26
| --- | --- | --- | --- |
27
27
|[Delay](/dotnet/api/azure.core.retryoptions.delay)|[TimeSpan](/dotnet/api/system.timespan)| The delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-based approach. If the service provides a Retry-After response header, the next retry is delayed by the duration specified by the header value. | 0.8 second |
28
28
|[MaxDelay](/dotnet/api/azure.core.retryoptions.maxdelay)|[TimeSpan](/dotnet/api/system.timespan)| The maximum permissible delay between retry attempts when the service doesn't provide a Retry-After response header. If the service provides a Retry-After response header, the next retry is delayed by the duration specified by the header value. | 1 minute |
29
-
|[MaxRetries](/dotnet/api/azure.core.retryoptions.maxretries)| int | The maximum number of retry attempts before giving up. | 5 |
29
+
|[MaxRetries](/dotnet/api/azure.core.retryoptions.maxretries)| int | The maximum number of retry attempts before giving up. | 5 (see note) |
30
30
|[Mode](/dotnet/api/azure.core.retryoptions.mode)|[RetryMode](/dotnet/api/azure.core.retrymode)| The approach to use for calculating retry delays. | Exponential |
31
31
|[NetworkTimeout](/dotnet/api/azure.core.retryoptions.networktimeout)|[TimeSpan](/dotnet/api/system.timespan)| The timeout applied to an individual network operation. | 100 seconds |
32
32
33
+
> [!NOTE]
34
+
> `StorageClientOptions` increases the default value for `MaxRetries` from 3 to 5. All other properties have the same default values as `RetryOptions`.
35
+
33
36
In this code example for Blob Storage, we configure the retry options in the `Retry` property of the [BlobClientOptions](/dotnet/api/azure.storage.blobs.blobclientoptions) class. Then, we create a client object for the blob service using the retry options.
@@ -128,3 +128,4 @@ The following guide shows you how to manage resources and perform specific actio
128
128
| Guide | Description |
129
129
| --- | --- |
130
130
|[Manage a storage account](storage-srp-manage-account-dotnet.md)| Learn how to create and manage a storage account, manage storage account keys, and configure client options to create a custom retry policy. |
Copy file name to clipboardExpand all lines: articles/storage/common/storage-srp-manage-account-dotnet.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn how to manage storage account resources with the Azure Storag
5
5
services: storage
6
6
author: pauljewellmsft
7
7
ms.author: pauljewell
8
-
ms.date: 08/01/2024
8
+
ms.date: 11/19/2024
9
9
ms.service: azure-blob-storage
10
10
ms.topic: how-to
11
11
ms.devlang: csharp
@@ -146,10 +146,26 @@ The following code example shows how to delete a storage account:
146
146
147
147
You can pass an [ArmClientOptions](/dotnet/api/azure.resourcemanager.armclientoptions) instance when creating an `ArmClient` object. This class allows you to configure values for diagnostics, environment, transport, and retry options for a client object.
148
148
149
-
The following code example shows how to configure the `ArmClient` object to change the default retry policy:
149
+
### Example: Configure retry options
150
+
151
+
The following code example shows how to configure the `ArmClient` object to use a custom retry policy:
If you don't specify a custom retry policy, the default retry values are used. The following table lists the properties of the [RetryOptions](/dotnet/api/azure.core.retryoptions) class, along with the type, a brief description, and the default value:
156
+
157
+
| Property | Type | Description | Default value |
158
+
| --- | --- | --- | --- |
159
+
|[Delay](/dotnet/api/azure.core.retryoptions.delay)|[TimeSpan](/dotnet/api/system.timespan)| The delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-based approach. If the service provides a Retry-After response header, the next retry is delayed by the duration specified by the header value. | 0.8 second |
160
+
|[MaxDelay](/dotnet/api/azure.core.retryoptions.maxdelay)|[TimeSpan](/dotnet/api/system.timespan)| The maximum permissible delay between retry attempts when the service doesn't provide a Retry-After response header. If the service provides a Retry-After response header, the next retry is delayed by the duration specified by the header value. | 1 minute |
161
+
|[MaxRetries](/dotnet/api/azure.core.retryoptions.maxretries)| int | The maximum number of retry attempts before giving up. | 3 |
162
+
|[Mode](/dotnet/api/azure.core.retryoptions.mode)|[RetryMode](/dotnet/api/azure.core.retrymode)| The approach to use for calculating retry delays. | Exponential |
163
+
|[NetworkTimeout](/dotnet/api/azure.core.retryoptions.networktimeout)|[TimeSpan](/dotnet/api/system.timespan)| The timeout applied to an individual network operation. | 100 seconds |
164
+
165
+
As you configure retry options for an `ArmClient` object, it's important to note that the [scale targets](scalability-targets-resource-provider.md) are different between the Storage resource provider (management plane) and the data plane. Be sure to configure retry options with these limits in mind.
166
+
167
+
If you exceed the rate limit for Azure Storage management plane APIs, you receive an HTTP status code `429 Too Many Requests`, which indicates that the request is being throttled. The response includes a `Retry-After` value, which specifies the number of seconds your application should wait (or sleep) before sending the next request. If you send a request before the retry value elapses, your request isn't processed and a new `Retry-After` value is returned.
168
+
153
169
## Resources
154
170
155
171
To learn more about resource management using the Azure management library for .NET, see the following resources.
0 commit comments