resilience

Implement .NET fault-tolerant operations with Polly v8 resilience pipelines.

4|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/zdanovichnick/dotnet-pilot --skill resilience-zdanovichnick
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: resilience
Source: https://github.com/zdanovichnick/dotnet-pilot/tree/main/skills/resilience
Command: npx skills add https://github.com/zdanovichnick/dotnet-pilot --skill resilience-zdanovichnick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents flaky, failure-prone .NET services by providing consistent resilience behaviors like retries, timeouts, circuit breaking, and HTTP client hardening.

Core Features & Use Cases

  • Retry with backoff and jitter: Re-attempt failed operations using controlled delays and selective exception/result handling.
  • Circuit breaker with failure ratio windows: Stop repeatedly failing calls to protect downstream dependencies and improve recovery.
  • Timeouts and hedging: Enforce per-attempt execution limits and optionally send duplicate requests to reduce tail latency for idempotent reads.

Quick Start

Instruct the AI to generate a ResiliencePipeline using Microsoft.Extensions.Resilience with a retry policy, a circuit breaker, and an HTTP client integration via AddStandardResilienceHandler.

Frequently Asked Questions about resilience

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

FAQPage Schema
How do I make .NET HTTP client calls fault-tolerant with retries and circuit breakers?▼

Make .NET HTTP client calls fault-tolerant by composing a ResiliencePipeline using Polly v8 and Microsoft.Extensions.Resilience, registering strategies like retry with backoff and circuit breakers via DI for robust service-to-service execution.

What is a circuit breaker with failure ratio windows and when should I use it?▼

A circuit breaker with failure ratio windows stops repeatedly failing .NET calls to protect downstream dependencies and improve recovery, used when you need to prevent cascading failures in service-to-service or database operations.

How do I configure hedging to reduce tail latency for idempotent HTTP requests?▼

Configure hedging in your ResiliencePipelineBuilder to send duplicate HTTP requests, reducing tail latency specifically for idempotent reads by racing parallel executions and returning the fastest successful result.

Can I use Microsoft.Extensions.Resilience pipelines with dependency injection and CancellationToken support?▼

Yes, Microsoft.Extensions.Resilience pipelines support DI pipeline registration and per-execution operations through ExecuteAsync, allowing you to pass a CancellationToken to enforce cooperative cancellation during fault-tolerant .NET operation execution.

What's the best way to enforce per-attempt execution limits with timeouts in Polly v8?▼

Enforce per-attempt execution limits by adding a timeout strategy to your ResiliencePipelineBuilder in Polly v8, ensuring individual HTTP client requests or database operations do not exceed specified execution durations.

Why do I need AddStandardResilienceHandler for HTTP client hardening in .NET?▼

You need AddStandardResilienceHandler to integrate pre-configured resilience pipelines directly into HTTP client calls, providing consistent fault tolerance behaviors like retries, timeouts, and circuit breaking across service-to-service requests.