Finity
Finity is a .NET Core resilience and Fault tolerance library that allows developers to extend IHttpClientFactory such as Retry, Circuit Breaker, Caching, Authentication and, Bulkhead Isolation.
Install / Use
/learn @savariamir/FinityREADME
Fault tolerance library designed for .Net core
Finity is a .NET Core resilience and Fault tolerance library that allows developers to extend IHttpClientFactory such as Retry, Circuit Breaker, Caching, Authentication and, Bulkhead Isolation.
Finity is a lightweight fault tolerance library designed to isolate access to remote resources and services. In a distributed environment, calls to remote resources and services can fail due to transient faults, such as slow network connections, timeouts, or the resources being overcommitted or temporarily unavailable.
Using Finity with HttpClient factory from ASPNET Core
Finity extends .Net Core HttpClient Factory to avoid transienting faults.
Installing via NuGet
Install-Package Finity
Retry
services
.AddHttpClient("finity")
.WithRetry(options =>
{
options.SleepDurationRetry = TimeSpan.FromMilliseconds(100);
options.RetryCount = 3;
});
Circuit Breaker
services
.AddHttpClient("finity")
.WithCircuitBreaker(options =>
{
options.SuccessAllowedBeforeClosing = 1;
options.DurationOfBreak = TimeSpan.FromMilliseconds(100);
options.ExceptionsAllowedBeforeBreaking = 2;
});
Caching
services
.AddHttpClient("finity")
.WithCache(options =>
{
options.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1);
});
Bulkhead
services
.AddHttpClient("finity")
.WithBulkhead(options =>
{
options.MaxConcurrentCalls = 100;
});
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
