I was reading up the documentation for Istio circuit breaker. I see that for a given interval we can set up a numerical value of consecutive5xxErrors
(and check few other settings) for the circuit breaking action to take effect.
I wanted to know if it was possible to somehow do circuit breaking in Istio based on the % of 5xxerrors
vs normal connections?
Following on the documentation that you've already found:
As you can see there are specific fields for the outlierDetection
:
consecutiveGatewayErrors
consecutive5xxErrors
interval
baseEjectionTime
maxEjectionPercent
minHealthPercent
The field that will force the request to not hit particular object is: consecutive5xxErrors
.
As also it can be seen in the documentation:
Field | Type | Description | Required |
---|---|---|---|
consecutive5xxErrors | UInt32Value | Number of 5xx errors before a host is ejected from the connection pool. When the upstream host is accessed over an opaque TCP connection, connect timeouts, connection error/failure and request failure events qualify as a 5xx error. This feature defaults to 5 but can be disabled by setting the value to 0. | No |
-- Istio.io: Latest: Docs: Reference: Config: Networking: Destination Rule: Outlier Detection
The value for it is flat and cannot be used as a percentage.
I found the feature request on the github page of Istio
that I think is referencing the feature that you would like to run:
I'd reckon you could try to use an EnvoyFilter
to modify the configuration of Envoy
(haven't tested it) as Envoy
itself has some fields related to the percentages of failures/successes. The documentation that should help you: