http-client-resilience

Configure IHttpClientFactory with Polly retry, circuit breaker, and timeout policies.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill http-client-resilience-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: http-client-resilience
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/http-client-resilience
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill http-client-resilience-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the inherent unreliability of HTTP calls to external services by implementing robust resilience patterns, preventing cascading failures and ensuring application stability.

Core Features & Use Cases

  • Resilient HTTP Communication: Configure IHttpClientFactory with Polly for retries, circuit breakers, and timeouts.
  • Best Practices: Implements essential patterns for HTTP client configuration, error handling, logging, and health checks.
  • Use Case: When integrating with a third-party payment API that experiences intermittent downtime, use this Skill to automatically retry failed requests, temporarily stop sending requests if the service is unavailable (circuit breaker), and set reasonable timeouts to prevent your application from hanging.

Quick Start

Configure a named HttpClient with retry, circuit breaker, and timeout policies using IHttpClientFactory and Polly.

Frequently Asked Questions about http-client-resilience

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

FAQPage Schema
How do I handle transient failures and retry HTTP requests in ASP.NET Core?

To handle transient failures and retry HTTP requests in ASP.NET Core, configure IHttpClientFactory with Polly to implement automated retry strategies, preventing cascading failures from network unreliability.

What is the best way to stop cascading failures when calling external APIs in .NET?

The best way to stop cascading failures when calling external APIs in .NET is implementing a circuit breaker pattern with Polly via IHttpClientFactory, which temporarily stops sending requests when a service is unavailable.

Can I use IHttpClientFactory to set request timeouts for third-party services?

Yes, you can use IHttpClientFactory to set request timeouts for third-party services by configuring Polly timeout policies, ensuring your application prevents hanging when integrating with intermittent external dependencies.

Do I need Polly to build custom resilience pipelines in .NET distributed systems?

Yes, you need Polly to build custom resilience pipelines in .NET distributed systems, as it provides the framework for configuring retry, circuit breaker, and timeout policies via IHttpClientFactory.

How do I configure a named HttpClient with retry and circuit breaker policies?

You configure a named HttpClient with retry and circuit breaker policies by registering IHttpClientFactory and chaining Polly policies during service configuration to establish robust HTTP communication patterns.