resilience

Configure Polly v8 resilience pipelines for .NET 10 HTTP clients and non-HTTP operations.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill resilience-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resilience
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/resilience
Command: npx skills add https://github.com/Resgrid/Core --skill resilience-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resilience patterns prevent your .NET 10 application from failing immediately when external dependencies (HTTP APIs, databases, queues) experience transient outages, latency spikes, or throttling.

Core Features & Use Cases

  • Polly v8 resilience pipelines: Build composable ResiliencePipeline handlers (retry, circuit breaker, timeout, fallback, rate limiting, hedging) instead of legacy Polly v7 policies.
  • HTTP client resilience via DI: Use AddResilienceHandler/AddStandardResilienceHandler with HttpClientFactory so resilience is applied consistently at the client layer.
  • Non-HTTP operation pipelines: Register named pipelines with AddResiliencePipeline for database, queue, and other operations, including timeout and retry logic.
  • Telemetry-ready monitoring: Instrument retries, circuit breaker state, and timeouts for operational visibility using Polly v8 metrics/OpenTelemetry patterns.
  • Safety guardrails: Avoid anti-patterns like retrying non-idempotent writes and ensure timeouts are always configured.

Quick Start

Add a standard resilience handler to your HttpClient so retry, circuit breaking, and timeouts are automatically applied to outbound calls.

Frequently Asked Questions about resilience

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

FAQPage Schema
How do I add resilience pipelines to HttpClient in .NET 10?

You can apply resilience pipelines to non-HTTP operations by registering named pipelines using AddResiliencePipeline, enabling composable timeout and retry logic for dependencies like databases and queues.

What is the difference between Polly v8 resilience pipelines and legacy v7 policies?

Polly v8 resilience pipelines provide telemetry-ready monitoring by instrumenting retries, circuit breaker states, and timeouts using Polly v8 metrics and OpenTelemetry patterns for operational visibility.

Can I apply retry and circuit breaker strategies to non-HTTP operations like databases?

You can apply resilience pipelines to non-HTTP operations by registering named pipelines using AddResiliencePipeline, enabling composable timeout and retry logic for dependencies like databases and queues.

Why should I avoid retrying non-idempotent writes in resilience pipelines?

To add resilience pipelines to HttpClient, use dependency injection with AddResilienceHandler or AddStandardResilienceHandler alongside HttpClientFactory to automatically apply retry, circuit breaker, and timeout strategies to outbound calls.