Circuit breaking needs to be configured in the current environment, so how to implement the circuit breaking at the gateway layer?
Asked
Active
Viewed 70 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Jun 08 '22 at 17:14
1 Answers
0
Here is an example of circuit breaking:
curl "http://127.0.0.1:9180/apisix/admin/routes/1" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/hello",
"plugins": {
"api-breaker": {
"break_response_code": 502,
"unhealthy": {
"http_statuses": [500, 503],
},
}
},
"upstream": {
"nodes": {
"httpbin.org:80": 1
}
}
}'
You can read more here.

Shreemaan Abhishek
- 1,134
- 1
- 7
- 33