ThreeMammals / Ocelot

.NET API Gateway

Home Page:https://www.nuget.org/packages/Ocelot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`FailureRatio` and `SamplingDuration` parameters of Polly V8 circuit-breaker

RaynaldM opened this issue · comments

Add two parameters in QoSOptions:

  • FailureRatio: The failure-success ratio that will cause the circuit to break/open.
  • SamplingDuration: The time period over which the failure-success ratio is calculated (in seconds).

The aim is to take better advantage of Polly's circuit-breaker possibilities, and to manage circuit-break conditions more finely, on a case-by-case basis.

Currently, these 2 parameters are set by default (and in hard coded) with an error ratio of 80% and a sample duration of 10 seconds. These values may not suit everyone.