转载请注明出处
相关链接
熔断配置示例yaml
uino-thing-topo-istio-rule.yaml
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
namespace: uino-topo
name: uino-topo-rule
spec:
host: uino-thing-topo
trafficPolicy:
connectionPool:
tcp:
maxConnections: 2
http:
http1MaxPendingRequests: 2
maxRequestsPerConnection: 2
outlierDetection:
consecutive5xxErrors: 1
interval: 1s
baseEjectionTime: 3m
maxEjectionPercent: 100
效果
可以看到添加熔断规则之后, 对于客户端的请求,直接返回了503的状态码
参考链接
https://istio.io/latest/zh/docs/tasks/traffic-management/circuit-breaking/
https://istio.io/latest/zh/docs/reference/config/networking/destination-rule/