resilience

Configure Polly v8 resilience pipelines for .NET applications with retries, circuit breaking, and timeouts.

640|145|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill resilience-codewithmukesh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resilience
Source: https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/resilience
Command: npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill resilience-codewithmukesh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents cascading failures and fragile network interactions in .NET 10 applications by providing composable, DI-friendly resilience pipelines that handle retries, circuit breaking, timeouts, fallback, hedging, and rate limiting so call sites remain simple and observable.

Core Features & Use Cases

  • Polly v8 ResiliencePipeline composition: build pipelines that chain retry, circuit breaker, timeout, fallback, and hedging strategies without manual nesting.
  • HttpClient integration: configure AddStandardResilienceHandler or AddResilienceHandler for IHttpClientFactory to apply per-service resilience defaults and named handlers.
  • Non-HTTP and typed pipelines: register AddResiliencePipeline for database, message queue, or typed return scenarios and inject keyed pipelines for testability.
  • Telemetry and safe defaults: emits metrics compatible with OpenTelemetry and recommends production-safe defaults (timeouts per attempt, total timeouts, idempotency, and monitoring).

Quick Start

Register an HttpClient in Program.cs and enable AddStandardResilienceHandler or AddResilienceHandler("service-name", ...) to apply retry, circuit breaker, and timeout policies for that external API.

Frequently Asked Questions about resilience

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Polly v8 resilience pipelines for HttpClient in .NET 10?

Configure HttpClient resilience in .NET 10 by registering IHttpClientFactory and using AddStandardResilienceHandler or AddResilienceHandler to apply retry, circuit breaker, and timeout policies per external service. Polly v8 ResiliencePipeline composition chains these strategies without manual nesting to prevent cascading failures.

What is the best way to handle transient failures in .NET applications with Polly v8?

Handle transient failures in .NET by building composable Polly v8 ResiliencePipeline instances that manage retries, circuit breaking, timeouts, fallback, hedging, and rate limiting. These DI-friendly pipelines keep call sites simple while handling fragile network interactions and database or message queue operations.

Can I use Polly v8 hedging for latency-sensitive reads in .NET?

Yes, Polly v8 hedging supports latency-sensitive reads in .NET applications. Resilience pipelines can be composed and tuned per service to execute hedged requests, falling back to alternate calls when primary external API interactions exceed acceptable latency thresholds.

How does Polly v8 integrate with OpenTelemetry for resilience metrics monitoring?

Polly v8 ResiliencePipeline telemetry integrates with OpenTelemetry by emitting metrics compatible with its monitoring standards. This provides production-safe defaults and observability for timeout tracking, circuit breaker state changes, retry attempts, and overall resilience pipeline health.

Does Polly v8 support typed pipelines for database and message queue operations?

Yes, Polly v8 supports typed pipelines via AddResiliencePipeline for non-HTTP scenarios including database and message queue operations. You can inject keyed pipelines for testability, applying resilience strategies to typed return scenarios beyond standard HttpClient factory integrations.

When should I use AddStandardResilienceHandler vs AddResilienceHandler in .NET?

Use AddStandardResilienceHandler to apply default retry, circuit breaker, and timeout policies for an external API, while AddResilienceHandler allows custom named handlers for per-service resilience tuning. Both integrate with IHttpClientFactory to manage network interactions in .NET 10.