-
Polly
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+.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
If we look at IL code something like this -SharpLab , you can see it is creating a state machine and Task under the hood.
BUT still more - the above works fine for things you can put into a queue of sorts. But for general limited-parallelism, especially with an HttpClient you might be injecting into controllers or other services, you should look at Microsoft.Extensions.Http.Polly, specifically Bulkhead https://github.com/App-vNext/Polly/wiki/Bulkhead The warnings in there are useful though - if for example the service you are hitting with the httpclient limits you to 5 concurrent requests, and you use a bulkhead policy with maxParallelism=5 on your webapi, but then you have 2 instances of your webapi running - you're going to exceed the service limit. But just to complete the example, you could then have
Related posts
-
The Retry Pattern and Retry Storm Anti-pattern
-
I thought "Availability Groups" would be 100% "seamless"
-
Do you really need "microservices"?
-
Only "exit 1" if VISIBLE errors are thrown during script invocation, ignoring try/catch blocks
-
Getting back into C# after a hiatus, any good reading material recommendations to get back up to speed? Been using Kotlin recently, and got quite a lot of experience in engineering.