Skip to content

Commit e3758e3

Browse files
authored
Merge pull request #311255 from cdpark/refresh-dapr-batch4
Feature 544074: Q&M: Freshness pass for Dapr in ACA and AKS - batch 4
2 parents c1ad915 + 1e5599b commit e3758e3

5 files changed

Lines changed: 95 additions & 84 deletions

File tree

articles/container-apps/dapr-component-resiliency.md

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Dapr component resiliency (preview)
2+
title: Dapr Component Resiliency (Preview)
33
titleSuffix: Azure Container Apps
44
description: Learn how to make your Dapr components resilient in Azure Container Apps.
55
services: container-apps
66
author: greenie-msft
77
ms.service: azure-container-apps
88
ms.subservice: dapr
9-
ms.topic: conceptual
10-
ms.date: 11/19/2024
9+
ms.topic: concept-article
10+
ms.date: 02/02/2026
1111
ms.author: nigreenf
1212
ms.reviewer: hannahhunter
1313
ms.custom:
@@ -22,7 +22,7 @@ ms.custom:
2222

2323
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.
2424

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:
2626

2727
- **Outbound operations:** Calls from the Dapr sidecar to a component, such as:
2828
- Persisting or retrieving state
@@ -34,7 +34,7 @@ You can configure resiliency policies like retries, timeouts, and circuit breake
3434

3535
The following screenshot shows how an application uses a retry policy to attempt to recover from failed requests.
3636

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":::
3838

3939
## Supported resiliency policies
4040

@@ -44,7 +44,7 @@ The following screenshot shows how an application uses a retry policy to attempt
4444

4545
## Configure resiliency policies
4646

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.
4848

4949
# [Bicep](#tab/bicep)
5050

@@ -97,7 +97,7 @@ resource myPolicyDoc 'Microsoft.App/managedEnvironments/daprComponents/resilienc
9797

9898
### Before you begin
9999

100-
Log in to the Azure CLI:
100+
Sign in to the Azure CLI.
101101

102102
```azurecli
103103
az login
@@ -113,22 +113,22 @@ az extension update --name containerapp
113113
### Create specific policies
114114

115115
> [!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).
117117
118118
Create resiliency policies by targeting an individual policy. For example, to create the `Outbound Timeout` policy, run the following command.
119119

120120
```azurecli
121-
az containerapp env dapr-component resiliency create --group MyResourceGroup --name MyDaprResiliency --environment MyEnvironment --dapr-component-name MyDaprComponentName --out-timeout 20
121+
az containerapp env dapr-component resiliency create --group <your-resource-group> --name <your-resiliency-name> --environment <your-environment> --dapr-component-name <your-component> --out-timeout 20
122122
```
123123

124-
[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).
125125

126126
### Create policies with resiliency YAML
127127

128128
To apply the resiliency policies from a YAML file, run the following command:
129129

130130
```azurecli
131-
az containerapp env dapr-component resiliency create --group MyResourceGroup --name MyDaprResiliency --environment MyEnvironment --dapr-component-name MyDaprComponentName --yaml <MY_YAML_FILE>
131+
az containerapp env dapr-component resiliency create --group <your-resource-group> --name <your-resiliency-name> --environment <your-environment> --dapr-component-name <your-component> --yaml <your-YAML-file>
132132
```
133133

134134
This command passes the resiliency policy YAML file, which might look similar to the following example:
@@ -163,54 +163,54 @@ inboundPolicy:
163163
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.
164164

165165
```azurecli
166-
az containerapp env dapr-component resiliency update --group MyResourceGroup --name MyDaprResiliency --environment MyEnvironment --dapr-component-name MyDaprComponentName --out-timeout 20
166+
az containerapp env dapr-component resiliency update --group <your-resource-group> --name <your-resiliency-name> --environment <your-environment> --dapr-component-name <your-component> --out-timeout 20
167167
```
168168

169169
### Update policies with resiliency YAML
170170

171171
You can also update existing resiliency policies by updating the resiliency YAML you created earlier.
172172

173173
```azurecli
174-
az containerapp env dapr-component resiliency update --group MyResourceGroup --name MyDaprResiliency --environment MyEnvironment --dapr-component-name MyDaprComponentName --yaml <MY_YAML_FILE>
174+
az containerapp env dapr-component resiliency update --group <your-resource-group> --name <your-resiliency-name> --environment <your-environment> --dapr-component-name <your-component> --yaml <your-YAML-file>
175175
```
176176

177177
### View policies
178178

179179
Use the `resiliency list` command to list all the resiliency policies attached to a container app.
180180

181181
```azurecli
182-
az containerapp env dapr-component resiliency list --group MyResourceGroup --environment MyEnvironment --dapr-component-name MyDaprComponentName
182+
az containerapp env dapr-component resiliency list --group <your-resource-group> --environment <your-environment> --dapr-component-name <your-component>
183183
```
184184

185-
Use `resiliency show` command to show a single policy by name.
185+
Use the `resiliency show` command to show a single policy by name.
186186

187187
```azurecli
188-
az containerapp env dapr-component resiliency show --group MyResourceGroup --name MyDaprResiliency --environment MyEnvironment --dapr-component-name MyDaprComponentName
188+
az containerapp env dapr-component resiliency show --group <your-resource-group> --name <your-resiliency-name> --environment <your-environment> --dapr-component-name <your-component>
189189
```
190190

191191
### Delete policies
192192

193193
To delete resiliency policies, run the following command.
194194

195195
```azurecli
196-
az containerapp env dapr-component resiliency delete --group MyResourceGroup --name MyDaprResiliency --environment MyEnvironment --dapr-component-name MyDaprComponentName
196+
az containerapp env dapr-component resiliency delete --group <your-resource-group> --name <your-resiliency-name> --environment <your-environment> --dapr-component-name <your-component>
197197
```
198198

199199
# [Azure portal](#tab/portal)
200200

201-
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.
202202

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":::
204204

205205
You can add resiliency policies to an existing Dapr component by selecting **Add resiliency** for that component.
206206

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":::
208208

209209
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.
210210

211211
:::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.":::
212212

213-
Click **Save** to save the resiliency policies.
213+
Select **Save** to save the resiliency policies.
214214

215215
> [!NOTE]
216216
> 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**.
222222
---
223223

224224
> [!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.
226226

227227
## Policy specifications
228228

@@ -253,7 +253,6 @@ properties: {
253253

254254
Define an `httpRetryPolicy` strategy for failed operations. The retry policy includes the following configurations.
255255

256-
257256
```bicep
258257
properties: {
259258
outbound: {
@@ -279,8 +278,8 @@ properties: {
279278

280279
| Metadata | Required | Description | Example |
281280
| -------- | --------- | ----------- | ------- |
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 http request. | `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 |
284283
| `retryBackOff.initialDelayInMilliseconds` | Yes | Delay between first error and first retry. | `1000` |
285284
| `retryBackOff.maxIntervalInMilliseconds` | Yes | Maximum delay between retries. | `10000` |
286285

@@ -315,14 +314,13 @@ properties: {
315314

316315
#### Circuit breaker process
317316

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.
320318

321319
The circuit waits half-open for the `timeoutInSeconds` amount of time, during which the `consecutiveErrors` number of requests must consecutively succeed.
322320
- _If the requests succeed,_ the circuit closes.
323321
- _If the requests fail,_ the circuit remains in a half-opened state.
324322

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.
326324

327325
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.
328326

@@ -342,13 +340,13 @@ ContainerAppConsoleLogs_CL
342340
| order by time_t desc
343341
```
344342

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.
346344

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":::
348346

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.
350348

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":::
352350

353351
Once debug logs are enabled, use a query similar to the following:
354352

@@ -360,10 +358,10 @@ ContainerAppConsoleLogs_CL
360358
| order by time_t desc
361359
```
362360

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.
364362

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":::
366364

367365
## Related content
368366

369-
See how resiliency works for [Service to service communication using Azure Container Apps built in service discovery](./service-discovery-resiliency.md)
367+
- [Service discovery resiliency (preview)](./service-discovery-resiliency.md)

articles/container-apps/dapr-components.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: Dapr components in Azure Container Apps
2+
title: Dapr Components in Azure Container Apps
33
description: Learn more about how Dapr components work on your Azure Container App service to develop applications.
44
ms.author: nigreenf
55
ms.reviewer: hannahhunter
66
author: greenie-msft
77
ms.service: azure-container-apps
88
ms.subservice: dapr
99
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
1212
---
1313

1414
# Dapr components in Azure Container Apps
@@ -43,7 +43,7 @@ spec:
4343
value: [METADATA-VALUE]
4444
```
4545
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.
4747

4848
```yaml
4949
componentType: [COMPONENT-TYPE]
@@ -57,7 +57,7 @@ metadata:
5757

5858
## Component scopes
5959

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`.
6161

6262
```yaml
6363
componentType: [COMPONENT-TYPE]
@@ -79,10 +79,10 @@ scopes:
7979

8080
# [YAML](#tab/yaml)
8181

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.
8383

8484
```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"
8686
```
8787

8888
```yaml
@@ -108,7 +108,7 @@ scopes:
108108

109109
# [Bicep](#tab/bicep)
110110

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.
112112

113113
```bicep
114114
resource daprComponent 'daprComponents@2022-03-01' = {
@@ -141,7 +141,7 @@ resource daprComponent 'daprComponents@2022-03-01' = {
141141

142142
# [ARM](#tab/arm)
143143

144-
This resource defines a Dapr component called `dapr-pubsub` via ARM.
144+
This resource defines a Dapr component called `dapr-pubsub` by using an ARM template.
145145

146146
```json
147147
{
@@ -174,9 +174,10 @@ This resource defines a Dapr component called `dapr-pubsub` via ARM.
174174

175175
---
176176

177-
## Next steps
177+
## Next step
178178

179-
[Learn how to connect to Azure and external services via Dapr components.][dapr-components-connect-services]
179+
> [!div class="nextstepaction"]
180+
> [Connect to other Azure or external services via Dapr components][dapr-components-connect-services]
180181

181182
<!-- Links Internal -->
182183

0 commit comments

Comments
 (0)