Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

A circuit breaker doesn't trip on httpConsecutiveErrors: 1 (for 500 response). All requests pass through and give a 500 instead. The 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. 

1 Answer

0 votes
by (50.2k points)

The reason for this issue is that fortio reports the exact number of sockets it had to open.

But if the connections got closed in the middle, the number that is reported by the fortio is not equal to the -c connections.

Refer: https://fortio.istio.io/data/qps_max-s2_to_s1-0.7.1-2018-04-05-22-04.json

Here in this it clearly shows the count is different. And in your question please check any HTTP error is reported in status. Because that is the main cause for fortio to return 500 or 503 whatever it may be. 

To rectify this error please remove the http errors and please specify your query more detail to solve the issue.

Browse Categories

...