【发布时间】:2021-08-13 03:41:03
【问题描述】:
我正在阅读the documentation for Istio circuit breaker。我看到对于给定的时间间隔,我们可以设置一个数值 consecutive5xxErrors(并检查一些其他设置)以使断路器动作生效。
我想知道是否有可能根据 5xxerrors 与正常连接的百分比在 Istio 中进行断路?
【问题讨论】:
标签: istio circuit-breaker servicemesh
我正在阅读the documentation for Istio circuit breaker。我看到对于给定的时间间隔,我们可以设置一个数值 consecutive5xxErrors(并检查一些其他设置)以使断路器动作生效。
我想知道是否有可能根据 5xxerrors 与正常连接的百分比在 Istio 中进行断路?
【问题讨论】:
标签: istio circuit-breaker servicemesh
按照您已经找到的文档:
如您所见,outlierDetection 有特定字段:
consecutiveGatewayErrorsconsecutive5xxErrorsintervalbaseEjectionTimemaxEjectionPercentminHealthPercent强制请求不命中特定对象的字段是:consecutive5xxErrors。
在文档中也可以看到:
| 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
它的值是固定的,不能用作百分比。
我在Istio 的 github 页面上找到了功能请求,我认为它引用了您想要运行的功能:
我认为您可以尝试使用EnvoyFilter 来修改Envoy 的配置(尚未测试),因为Envoy 本身有一些与失败/成功百分比相关的字段。应该对您有所帮助的文档:
【讨论】: