CoreSystem.Resilience 1.0.3

dotnet add package CoreSystem.Resilience --version 1.0.3
                    
NuGet\Install-Package CoreSystem.Resilience -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreSystem.Resilience" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreSystem.Resilience" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="CoreSystem.Resilience" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreSystem.Resilience --version 1.0.3
                    
#r "nuget: CoreSystem.Resilience, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoreSystem.Resilience@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreSystem.Resilience&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=CoreSystem.Resilience&version=1.0.3
                    
Install as a Cake Tool

⚡ CoreSystem.Resilience

Production-ready resilience framework for .NET 8

CoreSystem.Resilience provides a clean abstraction over resilience strategies for .NET applications. It enables applications to define named resilience pipelines while keeping business code independent from the underlying resilience implementation.

NuGet Downloads License .NET


✨ Features

  • ✅ Retry strategy
  • ✅ Circuit Breaker strategy
  • ✅ Timeout strategy
  • ✅ Named resilience pipelines
  • ✅ Dependency Injection integration
  • ✅ Polly abstraction
  • ✅ Built-in metrics
  • ✅ OpenTelemetry compatible
  • ✅ Extensible strategy builders
  • ✅ Strongly typed configuration

📦 Installation

dotnet add package CoreSystem.Resilience

🚀 Quick Start

builder.Services.AddResilience(options =>
{
    options.AddPipeline(PipelineType.Redis, pipeline =>
    {
        pipeline.AddRetry(retry =>
        {
            retry.MaxRetryAttempts = 3;
        });

        pipeline.AddTimeout(timeout =>
        {
            timeout.Timeout = TimeSpan.FromSeconds(2);
        });

        pipeline.AddCircuitBreaker(cb =>
        {
            cb.FailureRatio = 0.5;
        });
    });
});

Resolve a pipeline:

public sealed class RedisService(
    IResiliencePipelineProvider provider)
{
    private readonly IResiliencePipeline _pipeline =
        provider.GetPipeline(PipelineType.Redis);
}

Execute an operation:

await _pipeline.ExecuteAsync(async ct =>
{
    await redis.GetAsync(key, ct);
});

🛡 Supported Strategies

Strategy Description
Retry Retries transient failures.
Circuit Breaker Prevents repeated calls to unhealthy dependencies.
Timeout Limits the execution time of an operation.

📊 Built-in Metrics

CoreSystem.Resilience publishes metrics using System.Diagnostics.Metrics.

These metrics are compatible with OpenTelemetry and any OTLP-compatible backend.

Metric Description
core.resilience.executions Total pipeline executions.
core.resilience.execution.duration Pipeline execution duration.
core.resilience.retry.attempts Total retry attempts.
core.resilience.retry.successes Successful executions after one or more retries.
core.resilience.retry.failures Operations that failed after all retries.
core.resilience.circuitbreaker.opened Circuit breaker opened events.
core.resilience.circuitbreaker.closed Circuit breaker closed events.
core.resilience.circuitbreaker.half_opened Circuit breaker half-open transitions.
core.resilience.timeout.total Timeout events.
core.resilience.failures Total failed pipeline executions.

Register the meter:

builder.Services
    .AddOpenTelemetry()
    .WithMetrics(metrics =>
    {
        metrics.AddMeter("Core.Resilience");
    });

Compatible Platforms

Platform Supported
Prometheus
Grafana
Azure Monitor
OTLP
Datadog

🏗 Architecture

Application
      │
      ▼
IResiliencePipelineProvider
      │
      ▼
IResiliencePipeline
      │
      ├── Retry
      ├── Timeout
      ├── Circuit Breaker
      ├── Metrics
      │
      ▼
Protected Operation

📖 Documentation

The full documentation includes:

  • Getting Started
  • Configuration
  • Retry
  • Circuit Breaker
  • Timeout
  • Metrics
  • Architecture
  • Extensibility

Visit the GitHub repository for the complete documentation.


🤝 Contributing

Issues, discussions and pull requests are welcome.


📄 License

Released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 0 7/24/2026
1.0.2 28 7/23/2026
1.0.1 37 7/21/2026
1.0.0 43 7/21/2026

Initial release with Retry, Timeout, Circuit Breaker, OpenTelemetry metrics, and named resilience pipelines.