Search code examples
kubernetesdevopsistiocircuit-breakerenvoyproxy

Istio(0.7.1) : Circuit Breaker Doesn't work for httpConsecutiveErrors


Circuit breaker doesn't trip on httpConsecutiveErrors: 1 (for 500 response). All requests pass through and give a 500 instead . Circuit breaker should trip and should return 503(Service Unavailable) instead .

Follow the steps Circuit breaker setup .

Once httpbin is up you can simulate 500 with it Request :

kubectl exec -it $FORTIO_POD -c fortio /usr/local/bin/fortio -- load -c 1 -qps 0 -n 20 -loglevel Warning http://httpbin:8000/status/500

Running this will simulate 20 requests returning 500 .

But if you have applied the circuit breaker if should allow just the one request as 500 and remaining requests should be tripped and a 503 should be returned . This doesn't happen. Issue raised on github Github issue


Solution

  • Yes, currently Circuit Breaker is not working in the case of HTTP-500, it only works with (Http-502/3/4) till now. But for making Http-500 is in the scope of the circuit breaker the work has been started. You can check this GitHub issue for more detail.