--- type: docs title: "Resiliency spec" linkTitle: "Resiliency" weight: 3000 description: "The basic spec for a Dapr resiliency resource" --- The `Resiliency` Dapr resource allows you to define and apply fault tolerance resiliency policies. Resiliency specs are applied when the Dapr sidecar starts. {{% alert title="Note" color="primary" %}} Any resiliency resource can be restricted to a particular [namepsace]({{< ref isolation-concept.md >}}) and restricted access through scopes to any particular set of applications. {{% /alert %}} ## Format ```yml apiVersion: dapr.io/v1alpha1 kind: Resiliency metadata: name: version: v1alpha1 scopes: - spec: policies: # Required timeouts: timeoutName: # Replace with any unique name retries: retryName: # Replace with any unique name policy: duration: maxInterval: maxRetries: matching: httpStatusCodes: gRPCStatusCodes: circuitBreakers: circuitBreakerName: # Replace with any unique name maxRequests: timeout: trip: targets: # Required apps: appID: # Replace with scoped app ID timeout: retry: circuitBreaker: actors: myActorType: timeout: retry: circuitBreaker: circuitBreakerCacheSize: components: componentName: # Replace with your component name outbound: timeout: retry: circuitBreaker: ``` ## Spec fields | Field | Required | Details | Example | |--------------------|:--------:|---------|---------| | policies | Y | The configuration of resiliency policies, including:
  • `timeouts`
  • `retries`
  • `circuitBreakers`

[See more examples with all of the built-in policies]({{< ref resiliency-overview.md >}}) | timeout: `general`
retry: `retryForever`
circuit breaker: `simpleCB` | | targets | Y | The configuration for the applications, actors, or components that use the resiliency policies.
[See more examples in the resiliency targets guide]({{< ref targets.md >}}) | `apps`
`components`
`actors` | ## Related links [Learn more about resiliency policies and targets]({{< ref resiliency-overview.md >}})