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/container-apps/dapr-component-resiliency.md
+33-35Lines changed: 33 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
-
title: Dapr component resiliency (preview)
2
+
title: Dapr Component Resiliency (Preview)
3
3
titleSuffix: Azure Container Apps
4
4
description: Learn how to make your Dapr components resilient in Azure Container Apps.
5
5
services: container-apps
6
6
author: greenie-msft
7
7
ms.service: azure-container-apps
8
8
ms.subservice: dapr
9
-
ms.topic: conceptual
10
-
ms.date: 11/19/2024
9
+
ms.topic: concept-article
10
+
ms.date: 02/02/2026
11
11
ms.author: nigreenf
12
12
ms.reviewer: hannahhunter
13
13
ms.custom:
@@ -22,7 +22,7 @@ ms.custom:
22
22
23
23
Resiliency policies proactively prevent, detect, and recover from your container app failures. In this article, you learn how to apply resiliency policies for applications that use Dapr to integrate with different cloud services, like state stores, pub/sub message brokers, secret stores, and more.
24
24
25
-
You can configure resiliency policies like retries, timeouts, and circuit breakers for the following outbound and inbound operation directions via a Dapr component:
25
+
You can configure resiliency policies like retries, timeouts, and circuit breakers for the following outbound and inbound operation directions by using a Dapr component:
26
26
27
27
-**Outbound operations:** Calls from the Dapr sidecar to a component, such as:
28
28
- Persisting or retrieving state
@@ -34,7 +34,7 @@ You can configure resiliency policies like retries, timeouts, and circuit breake
34
34
35
35
The following screenshot shows how an application uses a retry policy to attempt to recover from failed requests.
36
36
37
-
:::image type="content" source="media/dapr-component-resiliency/dapr-component-resiliency.png" alt-text="Diagram demonstrating resiliency for container apps with Dapr components.":::
37
+
:::image type="content" source="media/dapr-component-resiliency/dapr-component-resiliency.png" alt-text="Diagram demonstrating resiliency for container apps with Dapr components." lightbox="media/dapr-component-resiliency/dapr-component-resiliency.png":::
38
38
39
39
## Supported resiliency policies
40
40
@@ -44,7 +44,7 @@ The following screenshot shows how an application uses a retry policy to attempt
44
44
45
45
## Configure resiliency policies
46
46
47
-
You can choose whether to create resiliency policies using Bicep, the CLI, or the Azure portal.
47
+
You can choose whether to create resiliency policies by using Bicep, the Azure CLI, or the Azure portal.
@@ -113,22 +113,22 @@ az extension update --name containerapp
113
113
### Create specific policies
114
114
115
115
> [!NOTE]
116
-
> If all properties within a policy are not set during create or update, the CLI automatically applies the recommended default settings. [Set specific policies using flags.](#create-specific-policies)
116
+
> If all properties within a policy aren't set during create or update, the CLI automatically applies the recommended default settings. To learn how to set specific policies using flags, see [Create specific policies](#create-specific-policies).
117
117
118
118
Create resiliency policies by targeting an individual policy. For example, to create the `Outbound Timeout` policy, run the following command.
[For a full list of parameters, see the CLI reference guide.](/cli/azure/containerapp/resiliency#az-containerapp-resiliency-create-optional-parameters)
124
+
For a full list of parameters, see the [CLI reference guide](/cli/azure/containerapp/resiliency#az-containerapp-resiliency-create-optional-parameters).
125
125
126
126
### Create policies with resiliency YAML
127
127
128
128
To apply the resiliency policies from a YAML file, run the following command:
This command passes the resiliency policy YAML file, which might look similar to the following example:
@@ -163,54 +163,54 @@ inboundPolicy:
163
163
Update your resiliency policies by targeting an individual policy. For example, to update the response timeout of the `Outbound Timeout` policy, run the following command.
Navigate into your container app environment in the Azure portal. In the left side menu under **Settings**, select **Dapr components** to open the Dapr component pane.
201
+
Navigate into your container app environment in the Azure portal. In the sidebar menu under **Settings**, select **Dapr components** to open the Dapr component pane.
202
202
203
-
:::image type="content" source="media/dapr-component-resiliency/dapr-component-pane.png" alt-text="Screenshot showing where to access the Dapr components associated with your container app.":::
203
+
:::image type="content" source="media/dapr-component-resiliency/dapr-component-pane.png" alt-text="Screenshot showing where to access the Dapr components associated with your container app." lightbox="media/dapr-component-resiliency/dapr-component-pane.png":::
204
204
205
205
You can add resiliency policies to an existing Dapr component by selecting **Add resiliency** for that component.
206
206
207
-
:::image type="content" source="media/dapr-component-resiliency/add-dapr-component-resiliency.png" alt-text="Screenshot showing where to click to add a resiliency policy to a Dapr component.":::
207
+
:::image type="content" source="media/dapr-component-resiliency/add-dapr-component-resiliency.png" alt-text="Screenshot showing the link to add a resiliency policy to a Dapr component." lightbox="media/dapr-component-resiliency/add-dapr-component-resiliency.png":::
208
208
209
209
In the resiliency policy pane, select **Outbound** or **Inbound** to set policies for outbound or inbound operations. For example, for outbound operations, you can set timeout and HTTP retry policies similar to the following.
210
210
211
211
:::image type="content" source="media/dapr-component-resiliency/outbound-dapr-resiliency.png" alt-text="Screenshot demonstrating how to set timeout or retry policies for an outbound operation.":::
212
212
213
-
Click **Save** to save the resiliency policies.
213
+
Select **Save** to save the resiliency policies.
214
214
215
215
> [!NOTE]
216
216
> Currently, you can only set timeout and retry policies via the Azure portal.
@@ -222,7 +222,7 @@ You can edit or remove the resiliency policies by selecting **Edit resiliency**.
222
222
---
223
223
224
224
> [!IMPORTANT]
225
-
> Once you've applied all the resiliency policies, you need to restart your Dapr applications.
225
+
> After you apply all the resiliency policies, you need to restart your Dapr applications.
226
226
227
227
## Policy specifications
228
228
@@ -253,7 +253,6 @@ properties: {
253
253
254
254
Define an `httpRetryPolicy` strategy for failed operations. The retry policy includes the following configurations.
255
255
256
-
257
256
```bicep
258
257
properties: {
259
258
outbound: {
@@ -279,8 +278,8 @@ properties: {
279
278
280
279
| Metadata | Required | Description | Example |
281
280
| -------- | --------- | ----------- | ------- |
282
-
| `maxRetries` | Yes | Maximum retries to be executed for a failed http-request. | `5` |
283
-
| `retryBackOff` | Yes | Monitor the requests and shut off all traffic to the impacted service when timeout and retry criteria are met. | N/A |
281
+
| `maxRetries` | Yes | Maximum retries to be executed for a failed httprequest. | `5` |
282
+
| `retryBackOff` | Yes | Monitors the requests and shut off all traffic to the impacted service when timeout and retry criteria are met. | N/A |
284
283
| `retryBackOff.initialDelayInMilliseconds` | Yes | Delay between first error and first retry. | `1000` |
285
284
| `retryBackOff.maxIntervalInMilliseconds` | Yes | Maximum delay between retries. | `10000` |
286
285
@@ -315,14 +314,13 @@ properties: {
315
314
316
315
#### Circuit breaker process
317
316
318
-
Specifying `consecutiveErrors` (the circuit trip condition as
319
-
`consecutiveFailures > $(consecutiveErrors)-1`) sets the number of errors allowed to occur before the circuit trips and opens halfway.
317
+
Specifying `consecutiveErrors` (the circuit trip condition as `consecutiveFailures > $(consecutiveErrors)-1`) sets the number of errors allowed to occur before the circuit trips and opens halfway.
320
318
321
319
The circuit waits half-open for the `timeoutInSeconds` amount of time, during which the `consecutiveErrors` number of requests must consecutively succeed.
322
320
- _If the requests succeed,_ the circuit closes.
323
321
- _If the requests fail,_ the circuit remains in a half-opened state.
324
322
325
-
If you didn't set any `intervalInSeconds` value, the circuit resets to a closed state after the amount of time you set for `timeoutInSeconds`, regardless of consecutive request success or failure. If you set `intervalInSeconds` to `0`, the circuit never automatically resets, only moving from half-open to closed state by successfully completing `consecutiveErrors` requests in a row.
323
+
If you didn't set any `intervalInSeconds` value, the circuit resets to a closed state after the amount of time you set for `timeoutInSeconds`, regardless of consecutive request success or failure. If you set `intervalInSeconds` to *0*, the circuit never automatically resets, only moving from half-open to closed state by successfully completing `consecutiveErrors` requests in a row.
326
324
327
325
If you did set an `intervalInSeconds` value, that determines the amount of time before the circuit is reset to closed state, independent of whether the requests sent in half-opened state succeeded or not.
328
326
@@ -342,13 +340,13 @@ ContainerAppConsoleLogs_CL
342
340
| order by time_t desc
343
341
```
344
342
345
-
Click **Run** to run the query and view the result with the log message indicating the policy is loading.
343
+
Select **Run** to run the query and view the result with the log message indicating the policy is loading.
346
344
347
-
:::image type="content" source="media/dapr-component-resiliency/dapr-resiliency-query-results-loading.png" alt-text="Screenshot showing resiliency query results based on provided query example for checking if resiliency policy has loaded.":::
345
+
:::image type="content" source="media/dapr-component-resiliency/dapr-resiliency-query-results-loading.png" alt-text="Screenshot showing resiliency query results based on provided query example for checking if resiliency policy has loaded." lightbox="media/dapr-component-resiliency/dapr-resiliency-query-results-loading.png":::
348
346
349
-
Or, you can find the actual resiliency policy by enabling debug logs on your container app and querying to see if a resiliency resource is loaded.
347
+
You can also find the actual resiliency policy by enabling debug logs on your container app and querying to see if a resiliency resource is loaded.
350
348
351
-
:::image type="content" source="media/dapr-component-resiliency/dapr-debug-logs.png" alt-text="Screenshot demonstrating how to enable debug logs on your container app via the portal.":::
349
+
:::image type="content" source="media/dapr-component-resiliency/dapr-debug-logs.png" alt-text="Screenshot demonstrating how to enable debug logs on your container app via the portal." lightbox="media/dapr-component-resiliency/dapr-debug-logs.png":::
352
350
353
351
Once debug logs are enabled, use a query similar to the following:
354
352
@@ -360,10 +358,10 @@ ContainerAppConsoleLogs_CL
360
358
| order by time_t desc
361
359
```
362
360
363
-
Click **Run** to run the query and view the resulting log message with the policy configuration.
361
+
Select **Run** to run the query and view the resulting log message with the policy configuration.
364
362
365
-
:::image type="content" source="media/dapr-component-resiliency/dapr-resiliency-query-results-policy.png" alt-text="Screenshot showing resiliency query results based on provided query example for finding the actual resiliency policy.":::
363
+
:::image type="content" source="media/dapr-component-resiliency/dapr-resiliency-query-results-policy.png" alt-text="Screenshot showing resiliency query results based on provided query example for finding the actual resiliency policy." lightbox="media/dapr-component-resiliency/dapr-resiliency-query-results-policy.png":::
366
364
367
365
## Related content
368
366
369
-
See how resiliency works for [Service to service communication using Azure Container Apps built in service discovery](./service-discovery-resiliency.md)
Copy file name to clipboardExpand all lines: articles/container-apps/dapr-components.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
-
title: Dapr components in Azure Container Apps
2
+
title: Dapr Components in Azure Container Apps
3
3
description: Learn more about how Dapr components work on your Azure Container App service to develop applications.
4
4
ms.author: nigreenf
5
5
ms.reviewer: hannahhunter
6
6
author: greenie-msft
7
7
ms.service: azure-container-apps
8
8
ms.subservice: dapr
9
9
ms.custom: build-2023
10
-
ms.topic: conceptual
11
-
ms.date: 12/03/2024
10
+
ms.topic: concept-article
11
+
ms.date: 02/02/2026
12
12
---
13
13
14
14
# Dapr components in Azure Container Apps
@@ -43,7 +43,7 @@ spec:
43
43
value: [METADATA-VALUE]
44
44
```
45
45
46
-
In Azure Container Apps, the above schema is slightly simplified to support Dapr components and remove unnecessary fields, including `apiVersion`, `kind`, and redundant metadata and spec properties.
46
+
In Azure Container Apps, this schema is slightly simplified to support Dapr components and remove unnecessary fields, including `apiVersion`, `kind`, and redundant metadata and spec properties.
47
47
48
48
```yaml
49
49
componentType: [COMPONENT-TYPE]
@@ -57,7 +57,7 @@ metadata:
57
57
58
58
## Component scopes
59
59
60
-
By default, all Dapr-enabled container apps within the same environment load the full set of deployed components. To ensure only the appropriate container apps load components at runtime, application scopes should be used. In the following example, the component is only loaded by the two Dapr-enabled container apps with Dapr application IDs `APP-ID-1` and `APP-ID-2`:
60
+
By default, all Dapr-enabled container apps within the same environment load the full set of deployed components. To ensure only the appropriate container apps load components at runtime, application scopes should be used. In the following example, the component is only loaded by the two Dapr-enabled container apps with Dapr application IDs `APP-ID-1` and `APP-ID-2`.
61
61
62
62
```yaml
63
63
componentType: [COMPONENT-TYPE]
@@ -79,10 +79,10 @@ scopes:
79
79
80
80
# [YAML](#tab/yaml)
81
81
82
-
To create a Dapr component via the Container Apps CLI, you can use a container apps YAML manifest. When configuring multiple components, you must create and apply a separate YAML file for each component.
82
+
To create a Dapr component by using the Container Apps CLI, you can use a container apps YAML manifest. When configuring multiple components, you must create and apply a separate YAML file for each component.
83
83
84
84
```azurecli
85
-
az containerapp env dapr-component set --name ENVIRONMENT_NAME --resource-group RESOURCE_GROUP_NAME --dapr-component-name pubsub --yaml "./pubsub.yaml"
85
+
az containerapp env dapr-component set --name <your-environment-name> --resource-group <your-resource-group> --dapr-component-name pubsub --yaml "./pubsub.yaml"
86
86
```
87
87
88
88
```yaml
@@ -108,7 +108,7 @@ scopes:
108
108
109
109
# [Bicep](#tab/bicep)
110
110
111
-
This resource defines a Dapr component called `dapr-pubsub` via Bicep. The Dapr component is defined as a child resource of the Container Apps environment. To define multiple components, you can add a `daprComponent` resource for each.
111
+
This resource defines a Dapr component called `dapr-pubsub` by using Bicep. The Dapr component is defined as a child resource of the Container Apps environment. To define multiple components, you can add a `daprComponent` resource for each.
0 commit comments