0

Circuit breaking needs to be configured in the current environment, so how to implement the circuit breaking at the gateway layer?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
feihan
  • 11
  • 1

1 Answers1

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