Our great sponsors
-
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.
Look into using a resilience framework. These tools have policies for retry, circuit breakers, timeouts, etc. A preferred framework for .Net is The Polly Project. I've used it in dealing with third-party APIs that timeout under heavy load. It can also be used to deal with database connectivity issues. The retry loops are configurable for the number of retries and the wait time. There are similar products for most languages. You can roll your own with a loop around a try/catch block where the catch increments the retry count and throws if the retry limit is exceeded.
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.