Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. Polly

Polly

BSD-3-ClauseC#8.6.6

A .NET resilience and transient-fault-handling library for expressing policies like Retry, Circuit Breaker, and Timeout in a fluent, thread-safe manner.

Visit WebsiteGitHubGitHub
14.2k stars1.3k forks0 contributors

What is Polly?

Polly is a .NET library for resilience and transient-fault handling that allows developers to define and execute policies like Retry, Circuit Breaker, Timeout, and Fallback. It solves the problem of building robust applications that can gracefully handle failures, timeouts, and overloads in distributed systems and microservices architectures.

Target Audience

.NET developers building applications that interact with external services, APIs, or databases, particularly those working on microservices, cloud-native systems, or any scenario requiring fault tolerance and resilience.

Value Proposition

Developers choose Polly for its fluent, thread-safe API, comprehensive set of built-in resilience strategies, and seamless integration with .NET dependency injection. It provides a standardized, battle-tested approach to handling transient faults without reinventing the wheel.

Overview

Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

Use Cases

Best For

  • Handling transient network failures when calling external APIs
  • Implementing circuit breakers to protect downstream services from overload
  • Adding retry logic with exponential backoff to database operations
  • Enforcing timeouts on slow or unresponsive service calls
  • Rate limiting outgoing requests to third-party APIs
  • Building resilient microservices architectures with fallback mechanisms

Not Ideal For

  • Applications with no external service dependencies or network calls
  • Teams preferring convention-over-configuration frameworks with auto-wired resilience
  • Projects where minimal latency overhead is critical, such as high-frequency trading systems
  • Environments already using platform-specific resilience (e.g., Azure Functions with built-in retries)

Pros & Cons

Pros

Comprehensive Strategy Suite

Polly offers a wide range of built-in resilience strategies including retry, circuit breaker, hedging, and rate limiting, as evidenced by the Key Features list covering reactive and proactive approaches.

Fluent Thread-Safe API

The library emphasizes a fluent, thread-safe API for defining resilience pipelines, allowing developers to combine strategies with minimal boilerplate, as stated in the Philosophy section.

Dependency Injection Integration

Through the Polly.Extensions package, it provides seamless dependency injection support with AddResiliencePipeline, enabling easy pipeline management in .NET applications, as shown in the Quick Start DI snippet.

Active Development and Sponsorship

Backed by sponsors like AWS, Microsoft, and GitHub, and part of the .NET Foundation, Polly is actively maintained with recent additions like chaos engineering in v8.3.0, ensuring ongoing updates and community support.

Cons

Explicit Configuration Overhead

Polly requires manual definition and tuning of each resilience strategy, which can lead to complex setup and potential misconfiguration, especially for beginners or rapid prototyping scenarios.

Breaking API Changes

The shift to v8 introduced a new API that is not backward compatible with v7, forcing migration efforts and potential code rewrites, as highlighted in the IMPORTANT note about documentation differences.

Performance Trade-Offs

Each added strategy incurs runtime overhead, such as latency from retry delays or circuit breaker state checks, which may not be suitable for latency-sensitive applications without careful optimization.

Frequently Asked Questions

Quick Stats

Stars14,185
Forks1,272
Contributors0
Open Issues4
Last commit1 day ago
CreatedSince 2013

Tags

#circuit-breaker#circuit-breaker-pattern#fault-tolerance#resilience#dotnet#resiliency-patterns#retry-pattern#microservices#timeout#rate-limiting#chaos-engineering

Built With

.
.NET Standard
.
.NET

Links & Resources

Website

Included in

.NET21.2kCore21.2kXamarin1.9k
Auto-fetched 21 hours ago

Related Projects

AutoMapperAutoMapper

A convention-based object-object mapper in .NET.

Stars10,191
Forks2,409
Last commit23 days ago
HumanizerHumanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Stars9,666
Forks1,052
Last commit19 days ago
OcelotOcelot

.NET API Gateway

Stars8,706
Forks1,685
Last commit2 days ago
AspNetCore.Diagnostics.HealthChecksAspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package

Stars4,364
Forks864
Last commit17 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub